<div class="gmail_quote">On Mon, Jul 14, 2008 at 11:42 AM, Todd Blanchard &lt;<a href="mailto:tblanchard@mac.com">tblanchard@mac.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So how do you make a weak reference? You stick a WeakArray in as a holder. &nbsp;So in your parent/child objects you would write something like:<br>
<br>
Node&gt;&gt;parent<br>
 &nbsp; &nbsp; &nbsp; &nbsp;^ parent ifNotNil: [parent first] ifNil: [parent]<br>
<br>
Node&gt;&gt;parent: p<br>
 &nbsp; &nbsp; &nbsp; &nbsp;parent := p ifNotNil: [WeakArray with: p] ifNil: [p]<br>
<br>
thus using a WeakArray as a holder for the parent.<br>
<br>
When a weak reference gets garbage collected, its weak references are set to nil first.</blockquote><div><br></div><div>Thank you! &nbsp;This is what I wanted to know; I&#39;ll give this a try, and see how it works for me...</div>
<div><br></div><div>So many Classes, so little time...</div><div><br></div><div>Rob</div><div><br></div></div>