Class VariableContextEntry and ReturnValueContextEntry are instantiated
when Package.addRule called.
This class are linked from "Package rules".
"Package => ... => VariableContextEntry
But class have a reference to the InternalWorkingMemory !
"Package => ... => VariableContextEntry => Workingmemory"
When this pseudo code is executed, at the end of the execution,
WorkingMemory need to be garbage collected, but it isn't because she is
referenced by ReturnValueContextEntry and/or VariableContextEntry, and
this class keeps an reference to the WorkingMemory.
I think this can be generate some error in multi thread and make an
"smal" memory leak.
It is right ?
The membre workingMemory can't be removed from
pseudo code (source : ReteooMannersTest) :
final Package ruleBase = new Package( "org.drools.examples.manners" );
ruleBase.addRule( getAssignFirstSeatRule() );
SatefulSession session = ruleBase.newStatefulSession(false);
session = null;
After GC, workingMemory (session) need to be finally but she isn't
because VariableContextEntry/ReturnValueContextEntry keep a reference at
Thanks for your response