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

Re: NSString uppercaseString


  • Subject: Re: NSString uppercaseString
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 27 Jun 2008 22:08:17 -0700


On 27 Jun '08, at 8:51 PM, Shawn Erickson wrote:

Could I assume if the doc does not mention releasing the memory, then I
don't have to worry about it?

No :)

Well, to respond a bit more positively, it's not what the doc says so much as what the method's named, that tells you what its behavior is.


In general, only the methods "alloc", "new", "copy" and "mutableCopy" create references that you're responsible for releasing. In all other cases you're not responsible for releasing the object returned; either it belongs to another object already, or it's already been autoreleased so it'll be cleaned up later.

There are some details/subtleties (some having to do with the exact lifespan of a returned object) but the above is most of what you need to keep in mind.

—Jens_______________________________________________

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: 
 >NSString uppercaseString (From: "Sam Mo" <email@hidden>)
 >Re: NSString uppercaseString (From: Tito Ciuro <email@hidden>)
 >Re: NSString uppercaseString (From: Uli Kusterer <email@hidden>)
 >Re: NSString uppercaseString (From: Tito Ciuro <email@hidden>)
 >Re: NSString uppercaseString (From: Sam Mo <email@hidden>)
 >Re: NSString uppercaseString (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: Style Question
  • Next by Date: Re: Style Question
  • Previous by thread: Re: NSString uppercaseString
  • Next by thread: Catching the delegate message in a subclass
  • Index(es):
    • Date
    • Thread