• 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: Tom Bunch <email@hidden>
  • Date: Mon, 30 Jun 2008 15:12:32 -0700

On Jun 29, 2008, at 9:42 AM, Mike Ferris wrote:
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...)


How about if you're implementing an initializer for a class cluster that decides, perhaps based on parameters, that it wants to return an instance of a subclass instead of self?

On Jun 28, 2008, at 9:14 PM, Omar Qazi wrote:
Well theres no way to know, unless it's specifically mentioned in the documentation, but it really shouldn't matter. If you need the object retain it, if you don't let someone else worry about it.

This will keep you from crashing in the short term, but if you never take the time to crack this and learn to match all your retaining calls with releases, your application is doomed to die a slow leaky death. Perhaps I'm misinterpreting you...


-Tom

_______________________________________________

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: 
 >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>)
 >Re: Methods that return autoreleased objects? (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: Core animation
  • Next by Date: iPhone: Flip core animation performance with images in UIButtons
  • Previous by thread: Re: Methods that return autoreleased objects?
  • Next by thread: Re: Methods that return autoreleased objects?
  • Index(es):
    • Date
    • Thread