<br><br><div class="gmail_quote">On 1 March 2012 23:10, shawn <span dir="ltr">&lt;<a href="mailto:youngxiao121@hotmail.com">youngxiao121@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you very much~<br>
1- You don&#39;t &quot;retract&quot;, you can set it to null, same way as set to an<br>
object.<br>
Is it in java or in drool?</blockquote><div>...? It&#39;s a Java object, made visible to DRL code.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> If I understand correct, global variable is not<br>

really inserted into the working memory,right?</blockquote><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Global just ensure drool can<br>

see the variable?<br></blockquote><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2-Several ways, simple is to use KnowledgeSession&#39;s getFactHandles, and<br>
retract them. Or dispose the entire Session, and create another one, which<br>
might be faster.<br>
You mean the working memory belongs to the Session not knowledgeBase?<br></blockquote><div>Yes. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Because I have to keep the knowledgebase running all the time, I have to<br>
ensure each fire() don&#39;t leave any useless facts in the working memeory.</blockquote><div>Now you know how to.</div><div>-W </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-make-the-working-memory-clean-tp3790730p3791905.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-make-the-working-memory-clean-tp3790730p3791905.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>