On 6-Jan-07, at 10:03 AM, Karen wrote:
On Jan 6, 2007, at 9:51 AM, Charles Yeomans wrote:
On Jan 6, 2007, at 5:08 AM, Peter Bozek wrote:
On 1/6/07, Charles Yeomans <[EMAIL PROTECTED]> wrote:
Storing a reference to parentObject in the dictionary simply moves
the problem. You still need to delete that last reference
yourself.
But if the dictionary is garbage collected?
If the dictionary is destroyed, then, yes, the reference counts of
objects to which it contains references will be decremented.
So for a tree if you put code in a node's destructor to Nil the
dictionary if the object has no parent, it could be automated?
For most trees you can forget about the dictionary and just
strategically lock and unlock the parent references. It limits how
you interface with the tree structure and things can still explode if
you haven't accounted for every situation, but it's workable for
certain applications. I recently refactored my scene graph to be more
strict, so I might actually be able to get away with this now - needs
more thought...
Frank.
<http://developer.chaoticbox.com/>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>