• 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: [[myObj retain] autorelease]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [[myObj retain] autorelease]


  • Subject: Re: [[myObj retain] autorelease]
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 12 Jul 2005 14:46:02 -0500


On Jul 12, 2005, at 2:32 PM, Ben Kazez wrote:

Sorry to ask a question about a topic that appears so frequently, but here I go: I haven't been able to find anything that explains when to use

   return [[myObj retain] autorelease];

instead of just

   return [myObj autorelease];

For example, Apple's default accessor methods do this. Is the reasoning something to do with thread-safeness perhaps?

The following is about the best article on this:

<http://www.stepwise.com/Articles/Technical/2002-06-11.01.html>

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
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


References: 
 >[[myObj retain] autorelease] (From: Ben Kazez <email@hidden>)

  • Prev by Date: Re: Predicate Problems
  • Next by Date: Re: [[myObj retain] autorelease]
  • Previous by thread: [[myObj retain] autorelease]
  • Next by thread: Re: [[myObj retain] autorelease]
  • Index(es):
    • Date
    • Thread