Can someone explain what a "weak" vs (I am guessing) "strong" reference is? I have been struggling with Garbage Collection for quite some time now and saw this on another list:<div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">"You'll need to add an instance variable to process and modify fork to record the origin. Currently processes don't remember their ancestor. I recommend you create a special fork that remembers ancestry, rather than modifying the default fork. You will potentially accumulate a lot of garbage otherwise. Also, you might consider making the reference from a process to its parent weak to allow the parent to be GC'ed when it terminates even if it has children."</span><br>
</div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">I, too, am maintaining parent/child relationships in my application and have just been doing something like:</span></div>
<div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse;">Parent>>createChild</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> |child|</span></div><div>
<span class="Apple-style-span" style="border-collapse: collapse;"> child := Child new parent: self.</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"> ^child</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">I am assuming, given my troubles, that this is NOT a weak reference?!</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">Thank you,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">Rob</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div>