On Sun, Feb 24, 2008 at 2:25 AM, Jack Repenning <[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to