Hi Joachim,<div><br></div><div>    the Behavior&gt;&gt;flushCache method, primitive 89, flushes the entire cache, so its all you need. There are alternative primitives that flush selectively, i.e. Symbol&gt;&gt;flushCache, primitive 119, and CompiledMethod&gt;&gt;flushCache, primitive 116, flush only entries for the receivers.<br>
<br></div><div>HTH</div><div>Eliot</div><div><br><div class="gmail_quote">On Thu, May 20, 2010 at 10:52 AM, Stéphane Ducasse <span dir="ltr">&lt;<a href="mailto:stephane.ducasse@inria.fr">stephane.ducasse@inria.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Begin forwarded message:<br>
<br>
&gt; From: Joachim Geidel &lt;<a href="mailto:joachim.geidel@onlinehome.de">joachim.geidel@onlinehome.de</a>&gt;<br>
&gt; Date: May 20, 2010 6:31:51 PM GMT+02:00<br>
&gt; To: &lt;<a href="mailto:pharo-users@lists.gforge.inria.fr">pharo-users@lists.gforge.inria.fr</a>&gt;<br>
&gt; Subject: [Pharo-users] Flushing the VM method cache?<br>
&gt; Reply-To: A friendly place where any question about pharo is welcome &lt;<a href="mailto:pharo-users@lists.gforge.inria.fr">pharo-users@lists.gforge.inria.fr</a>&gt;<br>
&gt;<br>
&gt; Hello all,<br>
&gt;<br>
&gt; The software I am working on generates classes on the fly, and discards<br>
&gt; those classes when they are no longer needed. The class library is<br>
&gt; cross-platform, i.e. it exists for Dolphin and VisualWorks, and I am<br>
&gt; currently porting it to Pharo.<br>
&gt;<br>
&gt; In Dolphin, it is necessary to flush the VM&#39;s method cache after discarding<br>
&gt; all the dynamically generated classes, because the method cache holds<br>
&gt; references to the classes which prevent them from being garbage collected.<br>
&gt; For VisualWorks, I have adopted this, although I am not quite sure if it&#39;s<br>
&gt; actually needed there.<br>
&gt;<br>
&gt; In the Pharo 1.0 image, I haven&#39;t found a method for flushing the VM&#39;s<br>
&gt; method cache in one go, there only seems to be Behavior&gt;&gt;flushCache.<br>
&gt;<br>
&gt; What I would like to know is:<br>
&gt; - Does the VM method cache of the Squeak VM hold references to classes which<br>
&gt; prevent an obsolete class from being garbage collected? If this is not the<br>
&gt; case, I don&#39;t need to flush anything.<br>
&gt; - If flushing the cache is advisable, is Behavior&gt;&gt;flushCache the only way<br>
&gt; to do this? I would have to pick up all the obsolete classes and iterate<br>
&gt; over them in that case.<br>
&gt;<br>
&gt; Thanks in advance!<br>
&gt; Joachim Geidel<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Pharo-users mailing list<br>
&gt; <a href="mailto:Pharo-users@lists.gforge.inria.fr">Pharo-users@lists.gforge.inria.fr</a><br>
&gt; <a href="http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users" target="_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users</a><br>
<br>
<br>
_______________________________________________<br>
Pharo-project mailing list<br>
<a href="mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@lists.gforge.inria.fr</a><br>
<a href="http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project" target="_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project</a><br>
</blockquote></div><br></div>