[rules-dev] workingmemory and dispose()

Michael Neale michael.neale at gmail.com
Mon Apr 23 07:02:43 EDT 2007


I am OK with that as long as examples and doco show the newStatelessSession
generously.

I never liked the weakhashmap - it kind of got rid of the leak on paper, but
put a load on the GC at the worst possible time.

Stateless and Statefull are great ideas I think. WorkingMemory is then
either just an interface, or mainly a "concept" that people talk about.
Everything else out there likes to use the word session (eg hibernate) so
the semantics of it are pretty well understood.

On 4/23/07, Mark Proctor <mproctor at codehaus.org> wrote:
>
> currently working memories are auto garbage collected once you null
> them, by using a weak hashmap in the RuleBase. I'm currently adding
> async methods to the working memory, which means that the weak hashmap
> no longer works. So I'm thinking of using a normal hashmap, which means
> people MUST call workingMemory.dispose() or they will get memory leaks,
> are people ok with that? I now have ruleBase.newStatelessSession which
> won't adding the session to the Map, to avoid having to call dispose()
> for stateless sessions.
>
> Mark
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20070423/cee8f972/attachment.html 


More information about the rules-dev mailing list