[rules-users] Memory leak in 5.2/5.3

alopez alopez at termmed.com
Tue Oct 4 17:51:32 EDT 2011


Good news, I followed your advice and patched drools-core to prevent this,
focusing on removing all listeners:

AbstractWorkingMemory.java, line 1246:

for ( Iterator it = this.__ruleBaseEventListeners.iterator(); it.hasNext();
) {
       this.ruleBase.removeEventListener( (RuleBaseEventListener) it.next()
);
}

I changed that to:

for ( Iterator it = this.ruleBase.getRuleBaseEventListeners().iterator();
it.hasNext(); ) {
       this.ruleBase.removeEventListener( (RuleBaseEventListener) it.next()
);
}

And now works OK, no memory leak.

Thanks



--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-Memory-leak-in-5-2-5-3-tp3280351p3394726.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list