Re: disowning a bundle?
Re: disowning a bundle?
- Subject: Re: disowning a bundle?
- From: "Hamish Allan" <email@hidden>
- Date: Sun, 24 Feb 2008 02:44:41 +0000
On Sun, Feb 24, 2008 at 2:25 AM, Jack Repenning <email@hidden> wrote:
> In my -(id)initWithContext:, I [NSBundle loadNibNamed:@"SCCommitUI"
> owner:self]. Among other things, this retains me a few times inside
> the bundle. When I'm done, I want "self" to go away, but it does not:
> the retain count never goest to zero (my dealloc is never called),
> because of those retains inside the bundle. How do I make the
> bundle / nib let me go?
A similar question came up recently on the list, and the short answer
is: if the bundle wants to retain you, let it do so; if you want the
resources you release in your dealloc method gone sooner, create an
API for that (c.f. [NSFileHandle closeFile]).
Best wishes,
Hamish
_______________________________________________
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