• 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: Questions about Nib Object Retention
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about Nib Object Retention


  • Subject: Re: Questions about Nib Object Retention
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 20 Oct 2009 23:04:03 -0700

I would tend to use a simpler pattern: make assign outlets on file's
owner for each top-level object, and release them in -dealloc.

This pattern is based on the tendency for nibs to be "part of" another
object.  For example, think of NSWindowController or NSViewController.
 Logically, the object graph living inside the associated nib is
really a necessary functional part of the controller object; it
doesn't make much sense to have a window controller with no window.
So the top level objects are almost always of interest only to other
objects in the nib (which don't factor into this whole scheme and
behave no differently than if they were created in code) and to file's
owner (which orchestrates the nib loading and therefore assumes
responsibility for curating its top level objects).

--Kyle Sluder
_______________________________________________

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

References: 
 >Questions about Nib Object Retention (From: an0 <email@hidden>)
 >Re: Questions about Nib Object Retention (From: Graham Cox <email@hidden>)
 >Re: Questions about Nib Object Retention (From: an0 <email@hidden>)

  • Prev by Date: Re: Questions about Nib Object Retention
  • Next by Date: Re: Magic Mouse and NSTouch
  • Previous by thread: Re: Questions about Nib Object Retention
  • Next by thread: Re: Questions about Nib Object Retention
  • Index(es):
    • Date
    • Thread