• 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: Releasing what's in an array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Releasing what's in an array?


  • Subject: Re: Releasing what's in an array?
  • From: Shawn Erickson <email@hidden>
  • Date: Fri, 25 Feb 2005 11:13:42 -0800


On Feb 25, 2005, at 10:55 AM, Rogelio M.Serrano Jr. wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2005-02-26 02:45:48 +0800 Mark Dawson <email@hidden> wrote:

Yes, you are (more) correct.
The question remains: does a release of an array cause a release of its containing elements, or do I explicitly need to remove the elements before releasing that array?

Yes. Its all managed by NSAutorelease.

NSAutoreleasePool is not involved here since in all likelihood release messages are being sent and not autorelease messages. This clean up logic is managed by code in NSArray's dealloc method which likely calls removeAllObjects or the same internal method that removeAllObject may call.


-Shawn

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Releasing what's in an array? (From: "Rogelio M.Serrano Jr." <email@hidden>)

  • Prev by Date: Disabling NSTableView's big black editing box?
  • Next by Date: Re: Please help a newbie with delegation!
  • Previous by thread: Re: Releasing what's in an array?
  • Next by thread: Re: Releasing what's in an array?
  • Index(es):
    • Date
    • Thread