[Newbies] What is a "weak" reference
Michael Davies
mykdavies+squeak at gmail.com
Mon Jul 14 18:03:44 UTC 2008
On Mon, Jul 14, 2008 at 4:43 PM, Herbert König <herbertkoenig at gmx.net> wrote:
> Hello Michael,
>
>
> Child>>>parent
> MD> ^ Parent allInstances detect: [ :each | each children includes: self ]
>
> allInstances scans *every* object in the image which is slow.
Ouch, I can see that it would be :-)
> The garbage collector needs a path to a root object (whatever that is)
> so a purely circular reference does not prevent garbage collection of
> parent and child.
Thanks, that's interesting - does that mean that the parent-child
linkage in Rob's example isn't the root cause of his problem?
More information about the Beginners
mailing list