On Mon, Jul 14, 2008 at 11:42 AM, Todd Blanchard <tblanchard@mac.com> wrote:
So how do you make a weak reference? You stick a WeakArray in as a holder.  So in your parent/child objects you would write something like:

Node>>parent
       ^ parent ifNotNil: [parent first] ifNil: [parent]

Node>>parent: p
       parent := p ifNotNil: [WeakArray with: p] ifNil: [p]

thus using a WeakArray as a holder for the parent.

When a weak reference gets garbage collected, its weak references are set to nil first.

Thank you!  This is what I wanted to know; I'll give this a try, and see how it works for me...

So many Classes, so little time...

Rob