Re: objectAtIndex
Re: objectAtIndex
- Subject: Re: objectAtIndex
- From: Sherm Pendley <email@hidden>
- Date: Sun, 1 Nov 2009 15:24:16 -0500
On Sun, Nov 1, 2009 at 2:44 PM, Nava Carmon <email@hidden> wrote:
>
> NSObject *anObject = [anArray objectAtIndex:i];
...
> Should I release it?
No. You didn't create anObject with +alloc or a method beginning with
-copy, nor did you send it a -retain message. Therefore you do not own
it and must not release it.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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