Explicit release when using garbage collection with circular references
Explicit release when using garbage collection with circular references
- Subject: Explicit release when using garbage collection with circular references
- From: David <email@hidden>
- Date: Sun, 22 Mar 2009 00:11:35 -0400
Is there any issue issuing explicit release when using garbage
collection with Leopard and Obj-c 2.0?
I've become aware that I have lots of memory not being freed within my
application. I presume this is because its a tree structure with
parent child pointers between the objects. If I drop the last
reference to the tree, I presume the tree does not get garbage
collected because each object has circular pointers between them, ie
parent has references to children and each child has a reference to
its parent. In this case, it seem that the appropriate course of
action would be to call a specific method to forcibly release each
node in the tree.
Is this the proper approach?
Should garbage collection somehow work anyway?
Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden