<div dir="ltr"><div><div><div><div>Hi Tim,<br></div>yes, MatFileStructureElement class has an instance variable named weakSubclasses which is a WeakValueDictionary for that purpose.<br></div>I used a Dictionary rather than just a WeakArray, because the class also acts as a namespace (an Environment).<br></div>Otherwise, I would need to define a specific kind of environment pointing weakly to its binding values, and this would create portability problems for not so much added value (Pharo does not have Environment for example).<br></div><br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-26 23:25 GMT+02:00 tim Rowledge <span dir="ltr"><<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
> On 26-03-2018, at 2:15 PM, Bob Arning <<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>> wrote:<br>
><br>
> Other that the WeakValueDictionary, is there anything referencing either the class or metaclass? If not, then they would be collected. Perhaps VW is saving a reference elsewhere?<br>
<br>
</span>Usually a class' superclass would point to it with the subclasses array. If you were to make classes and *not* install them as a child of some superclass then I'd anticipate the class getting collected as soon as there are not instances being held onto. You could probably do interesting things by having the subclass array be weak and maybe having a mechanism that can (re)load a class when actually needed. But wait! That's at least in part what Craig has been doing with Context for some time now.<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Useful Latin Phrases:- Quo signo nata es? = What's your sign?<br>
<br>
<br>
<br>
</blockquote></div><br></div></div></div></div></div></div></div>