fh = wm.insert( new MyObject( 1 ) );
if you do
wm.update( fh, new MyObject( 2 );
The engine should not keep any references to instance MyObject( 1 )
Mark
On 02/04/2012 17:01, thenim wrote:
@laune, not sure how the map relates to the problem I stated. In a
map, the
put operation will replace the *value* that is mapped to by that key (from
my understanding). The map should not hold any further references to that
value(?)
The problem here isn't that, it's that the object reference is held on to
somewhere in the internals of the working memory even though the fact handle
is associated with a new object reference (I'm out of my depth here, but I'm
guessing this is what is causing the "leak"). The problem goes away, if I
update the same object (infact I find that my performance is significantly
better, so this is what I do now.)
I guess the references will be held till the session is disposed - which for
me doesn't happen as it's a long running sessions. Anyway, it's interesting
because I thought the rules engine only held weak references to objects...
--
View this message in context:
http://drools.46999.n3.nabble.com/Possible-memory-leak-in-5-3-with-update...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users