Re: if statement causing 32 Byte leak?
Re: if statement causing 32 Byte leak?
- Subject: Re: if statement causing 32 Byte leak?
- From: Graham Cox <email@hidden>
- Date: Sun, 10 Jan 2010 12:41:08 +1100
On 10/01/2010, at 12:35 PM, Mr. Gecko wrote:
> I just looked and saw that, so one question. Is array, string, and data all the same as new or are those autorelease?
As Joar said:
> From the memory management guide:
>
> "You take ownership of an object if you create it using a method whose
> name begins with “alloc” or “new” or contains “copy” (for example, alloc, newObject,
> or mutableCopy), or if you send it a retain message."
As far as I can see, 'new' begins with 'new'. Therefore you already own it.
--Graham
_______________________________________________
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