Re: Nib top-level object ownership?
Re: Nib top-level object ownership?
- Subject: Re: Nib top-level object ownership?
- From: Camillo Lugaresi <email@hidden>
- Date: Sat, 31 Dec 2005 13:42:50 +0100
On 31/dic/05, at 13:34, Camillo Lugaresi wrote:
Another solution could be this:
- get your retain count before and after loading the nib, and save
the difference in an ivar;
- override release: when your retain count drops to the saved
difference (ie only the objects in the nib are retaining you),
release the top-level objects.
Of course, that could cause surprises if you programmatically unbind
views that have retained your controller. Nothing should get over-
released, but the controller might release the top-level objects
ahead of time.
Is there an Apple-sanctioned solution to this whole problem?
Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden