On 1 March 2012 16:21, shawn <span dir="ltr">&lt;<a href="mailto:youngxiao121@hotmail.com">youngxiao121@hotmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don&#39;t understand the garbage collection mechanism in drool, though I have<br>
read the expert documentation.<br></blockquote><div>There is no specific &quot;garbage collection&quot; by Drools - Java&#39;s GC does the trick.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

1 - how to retract a global variable in drool?<br></blockquote><div>You don&#39;t &quot;retract&quot;, you can set it to null, same way as set to an object.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

2 - how to retract all the facts that have been inserted into the working<br>
memory?</blockquote><div>Several ways, simple is to use KnowledgeSession&#39;s getFactHandles, and retract them.</div><div><br></div><div>Or dispose the entire Session, and create another one, which might be faster.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> If I use halt(), does it retract all facts in the working memory and<br>
stop the all the rules?<br></blockquote><div>No. Yes.</div><div>-W </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-make-the-working-memory-clean-tp3790730p3790730.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-make-the-working-memory-clean-tp3790730p3790730.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>