Re: Releasing what's in an array?
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:09:34 -0800
On Feb 25, 2005, at 10:45 AM, Mark Dawson 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?
You must have missed my other email... but when the array is
_dealloced_ it will send a release message to all objects that it
contains before it itself is dealloced. If it didn't it would break
with the expect memory contract when using Cocoa (in a nut shell
"release what you retained or allocated (i.e. implicit retain) when you
are done with it").
-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