Re: NSString uppercaseString
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