Skip to content

Commit

Permalink
Explicitly destroy bean instance obtained from CDI object that is not…
Browse files Browse the repository at this point in the history
… in a normal scope. Not manually destroying these instances resulted in the context' map monotonically growing in size as described in Issue #3199.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
  • Loading branch information
spericas committed Jul 22, 2021
1 parent a9fed44 commit 5b86563
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ void clearScope() {
requestContext.release();
requestContext = null;
}
requestScope = null;
if (requestScope != null) {
CDI.current().destroy(requestScope);
requestScope = null;
}
requestController = null;
injectionManager = null;
state = State.CLEARED;
Expand Down

0 comments on commit 5b86563

Please sign in to comment.