Re: Questions about Nib Object Retention
Re: Questions about Nib Object Retention
- Subject: Re: Questions about Nib Object Retention
- From: Graham Cox <email@hidden>
- Date: Wed, 21 Oct 2009 14:55:19 +1100
On 21/10/2009, at 2:40 PM, an0 wrote:
Who owns the unarchived top-level objects' initial positive retain
count?
Nobody. That's what "no owning object" means.
Are they retained for outlet connections?
No, because if there is an outlet to them then they are owned.
Or are they just not autoreleased only because they are top-level,
regardless of whether there are any outlet connected to them?
They are not autoreleased because that would presumably cause problems
for the users of these objects, who don't own them either. If there's
an outlet to them, they are owned by whoever declares the outlet.
As it says, "Your code is responsible for releasing these top-level
objects".
This is not the big issue it seems. Most nibs don't contain top level
objects with no owners. For the very few that do, the objects most
likely leak but typically that's no big deal unless you're loading the
same nib repeatedly many times.
--Graham
_______________________________________________
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