Re: Xcode3.2 build and analyze warning for NSString allocation
Re: Xcode3.2 build and analyze warning for NSString allocation
- Subject: Re: Xcode3.2 build and analyze warning for NSString allocation
- From: Jens Alfke <email@hidden>
- Date: Sun, 27 Sep 2009 09:02:06 -0700
On Sep 27, 2009, at 2:03 AM, Nick Rogers wrote:
1. Method returns an Objective-C object with a +1 retain count
(owning reference).
It means exactly what it says. The string was created by -alloc, so
you own a reference so it, so you need to call -autorelease on it
before returning it.
No offense, but this is very basic Cocoa refcounting stuff, so it
sounds like you should carefully read the memory management guidelines.
—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