• 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: Methods that return autoreleased objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Methods that return autoreleased objects?


  • Subject: Re: Methods that return autoreleased objects?
  • From: Mike Ferris <email@hidden>
  • Date: Sun, 29 Jun 2008 09:42:41 -0700

Best thing to do about the top-level nib "exception" to the rule is to use NSWindowController or NSViewController to do your nib loading. These classes properly take responsibility for top-level objects of the nibs they load and then all you have to do is manage the lifetime of the controller object as you normally would.

And, as long as we're on the topic... who can name the only other exceptional case for the "release only if you alloc,new, copy or retain" rule? (It's pretty old-school...)

Mike Ferris

_______________________________________________

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: Methods that return autoreleased objects?
      • From: Tom Bunch <email@hidden>
    • Re: Methods that return autoreleased objects?
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >Methods that return autoreleased objects? (From: "john muchow" <email@hidden>)
 >Re: Methods that return autoreleased objects? (From: Markus Spoettl <email@hidden>)
 >Re: Methods that return autoreleased objects? (From: Charles Srstka <email@hidden>)
 >Re: Methods that return autoreleased objects? (From: mmalc crawford <email@hidden>)
 >Re: Methods that return autoreleased objects? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Output of NSHTTPCookieStorage to NSTableView
  • Next by Date: Re: Methods that return autoreleased objects?
  • Previous by thread: Re: Methods that return autoreleased objects?
  • Next by thread: Re: Methods that return autoreleased objects?
  • Index(es):
    • Date
    • Thread