Re: How to properly dealloc NSDictionary instance
Re: How to properly dealloc NSDictionary instance
- Subject: Re: How to properly dealloc NSDictionary instance
- From: Mike Abdullah <email@hidden>
- Date: Sat, 21 Jul 2007 16:33:27 +0100
How are you allocating the keys and values?
Mike.
On 21 Jul 2007, at 16:18, Mark Wade wrote:
Hello list,
Since I allocated both the keys and values in an
NSMutableDictionary I thought I would be responsible for
deallocating them so I use a keysEnumerator and a objectEnumerator
to loop though them and release them. That seems to work okay but
when I add ["NSDictionary instance" release] (not literal code) the
app drops into the debugger on exit. If I exclude iterating
through the keys and values and just release the dictionary that
works okay.
Do I just need to release the dictionary and its keys and objects
will be released also? Or if I iterate through the keys and
objects and release them is the dictionary also released.
--mark, somewhat unsure of object disposal, wade
_______________________________________________
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:
40mikeabdullah.net
This email sent to email@hidden
_______________________________________________
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