• 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
Adding self as Nib owner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding self as Nib owner


  • Subject: Adding self as Nib owner
  • From: Ian was here <email@hidden>
  • Date: Thu, 10 Jan 2008 12:05:39 -0800 (PST)

I recently noticed that when I add an instance of my
object as the owner of a Nib, that it's retain count
jumps to two.


- (id)init
{
    if ( self = [super init] )
    {
        [NSBundle loadNibNamed:@"MyNib" owner:self];
    }

    return self;
}


I've Googled this and learned that when my instance
finally is deallocated, that the Nib file it owns is
not. Apparently, the top level objects on the Nib file
(NSWindow, NSMenu, etc...) need to be manually released?!


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

_______________________________________________

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: Adding self as Nib owner
      • From: Keary Suska <email@hidden>
  • Prev by Date: [Meet] : Reminder, Los Angeles Cocoaheads meeting tonight at 7:30pm
  • Next by Date: Re: Setting spell-checker underlines
  • Previous by thread: [Meet] : Reminder, Los Angeles Cocoaheads meeting tonight at 7:30pm
  • Next by thread: Re: Adding self as Nib owner
  • Index(es):
    • Date
    • Thread