• 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: Autorelease Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autorelease Question


  • Subject: Re: Autorelease Question
  • From: Dave DeLong <email@hidden>
  • Date: Thu, 20 Nov 2008 18:57:38 -0700


On 20 Nov, 2008, at 6:54 PM, Klaus Backert wrote:

"Class factory methods are implemented by a class as a convenience for clients. They combine allocation and initialization in one step and return the created object autoreleased. These methods are of the form + (type)className... (where className excludes any prefix)."


"autoreleased" !

Because of this the following statements are identical, as far as I can see:

NSString *blah = [[[NSString alloc] init] autorelease];
NSString *blah = [NSString string];

Aren't they?

Yes. They are identical.

Dave
_______________________________________________

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: Autorelease Question
      • From: Luke the Hiesterman <email@hidden>
References: 
 >Autorelease Question (From: "Carmen Cerino Jr." <email@hidden>)
 >Re: Autorelease Question (From: Joseph Crawford <email@hidden>)
 >Re: Autorelease Question (From: Alexander Spohr <email@hidden>)
 >Re: Autorelease Question (From: Adam Leonard <email@hidden>)
 >Re: Autorelease Question (From: Klaus Backert <email@hidden>)

  • Prev by Date: Re: Autorelease Question
  • Next by Date: Re: Difference between "Target" and "Executable" ?
  • Previous by thread: Re: Autorelease Question
  • Next by thread: Re: Autorelease Question
  • Index(es):
    • Date
    • Thread