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

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

  • Follow-Ups:
    • Re: objectAtIndex
      • From: Nava Carmon <email@hidden>
References: 
 >objectAtIndex (From: Nava Carmon <email@hidden>)

  • Prev by Date: Re: objectAtIndex
  • Next by Date: Does [NSNetService getInputStream:outputStream:] really return retain objects and where does it say that
  • Previous by thread: Re: objectAtIndex
  • Next by thread: Re: objectAtIndex
  • Index(es):
    • Date
    • Thread