• 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: Should I retain/release IBOutlet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I retain/release IBOutlet?


  • Subject: Re: Should I retain/release IBOutlet?
  • From: Bill Bumgarner <email@hidden>
  • Date: Sat, 13 May 2006 20:24:34 -0700

On May 13, 2006, at 6:06 PM, Lon Giese wrote:
Im sure someone will argue with my answer but that's ok... Only top level objects in the Nib need to be released by you.. those are all the objects in the little window that contains 'File's Owner'. all other objects in a nib will be released automatically... for example any buttons you put in a window will be released by the window when it is deallocated. Now I never release the main menu even though it is a top level object, this is probably not stylistically correct but I never have any problem with it, since the main menu normally stays in existence throughout the application's life... Whatever object (usually File's Owner) that created the nib should release the top level objects in it... I strongly suggest using the document architecture because it automates many various tasks into a really nice way of managing nibs, window controllers and documents... It doesn't really matter if the object is connected to an IBOutlet or not, but I might be wrong about that I don't know everything about nibs yet... There are funny things that happen (and not very well documented) when you connect outlets between two different Nibs...

I would suggest reading the documentation (and not restating the documentation as per list guidelines).


Specifically, start here:

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ MemoryMgmt.html

Then read this:

http://developer.apple.com/documentation/Cocoa/Conceptual/ LoadingResources/Concepts/NibFileLoaded.html#//apple_ref/doc/uid/ 20000884

For Core Data:

http://devworld.apple.com/documentation/Cocoa/Conceptual/CoreData/ Articles/cdMemory.html



_______________________________________________
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


  • Follow-Ups:
    • Re: Should I retain/release IBOutlet?
      • From: Eric <email@hidden>
References: 
 >Should I retain/release IBOutlet? (From: Eric <email@hidden>)
 >Re: Should I retain/release IBOutlet? (From: Lon Giese <email@hidden>)

  • Prev by Date: VideoView rendering [was Double click in QTMovieView]
  • Next by Date: NSWindowController confusion
  • Previous by thread: Re: Should I retain/release IBOutlet?
  • Next by thread: Re: Should I retain/release IBOutlet?
  • Index(es):
    • Date
    • Thread