• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: disowning a bundle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: disowning a bundle?
      • From: Jack Repenning <email@hidden>
References: 
 >disowning a bundle? (From: Jack Repenning <email@hidden>)

  • Prev by Date: disowning a bundle?
  • Next by Date: Re: trouble closing windows
  • Previous by thread: disowning a bundle?
  • Next by thread: Re: disowning a bundle?
  • Index(es):
    • Date
    • Thread