Re: releasing NSArrays, NSDictionaries, etc ??
Re: releasing NSArrays, NSDictionaries, etc ??
- Subject: Re: releasing NSArrays, NSDictionaries, etc ??
- From: John Hörnkvist <email@hidden>
- Date: Tue, 25 Sep 2001 16:55:41 +0200
On Tuesday, September 25, 2001, at 04:09 PM, Robert Miller wrote:
Hello,
Here's a very basic question, I think. It states in the Cocoa
documentation that when an NS 'Mutable' array or dictionary is released,
all of the objects it (they) contain are sent release messages as well.
Does the same hold true for non-mutable forms of NSArray ,
NSDictionary,etc.? It mentions that a retain message is sent when added
but, does not actually state that a release message is sent when object
itself (the NSArray or NSDictionary) is released (unless I missed it
somewhere which is entirely possible)
Don't worry, the contents will be released.
You never have to release something that you haven't retained, copied or
allocated yourself.
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com