Re: Nib memory management under Garbage Collection
Re: Nib memory management under Garbage Collection
- Subject: Re: Nib memory management under Garbage Collection
- From: j o a r <email@hidden>
- Date: Thu, 15 Jan 2009 19:06:27 -0800
On Jan 15, 2009, at 6:35 PM, Rob Keniger wrote:
as far as I can tell the Nib objects should just get cleaned up
automatically as their root (the File's Owner) is no longer hanging
around.
Note that the files owner isn't necessarily the owner / root of all
objects instantiated by the nib file. It typically is, but not always.
I was just a bit confused by this page in the Memory Management guide:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemMgmtNibObjects.html
"The File’s Owner of a nib file is typically responsible for
releasing the top-level objects in a nib file as well as any non-
object resources created by the objects in the nib."
Under GC you're not responsible for releasing anything. That comment
doesn't apply to GC.
You have the inverse responsibility though: Making sure that you have
strong references to all objects that you're interested in keeping
alive.
j o a r
_______________________________________________
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