• 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: Okay, a stupid question about NSArrays...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Okay, a stupid question about NSArrays...


  • Subject: Re: Okay, a stupid question about NSArrays...
  • From: Rob Rix <email@hidden>
  • Date: Wed, 18 Jul 2001 20:22:08 -0400

When a NSArray is released, does that release the objects in the array as well? I would intuit that it does, but I can't find anything nailing this behaviour down. I really hate to ASSUME, but is my assumption that it releases all objects it has in it a correct one?

To my knowledge, this is how it goes:
When you add an object to an array, the array retains that object.
When you remove an object from an array, the array releases that object.

So, yes :)

-- Rob

Flying is the sustained art of falling sideways without letting physics catch on to what you're up to.


References: 
 >Okay, a stupid question about NSArrays... (From: Lloyd Sargent <email@hidden>)

  • Prev by Date: Re: Okay, a stupid question about NSArrays...
  • Next by Date: Re: [Help] NSTableDataSource and EXC_BAD_ACCESS
  • Previous by thread: Re: Okay, a stupid question about NSArrays...
  • Next by thread: [q] scriptSuite conflict problems (code included)
  • Index(es):
    • Date
    • Thread