How to properly dealloc NSDictionary instance
How to properly dealloc NSDictionary instance
- Subject: How to properly dealloc NSDictionary instance
- From: Mark Wade <email@hidden>
- Date: Sat, 21 Jul 2007 11:18:19 -0400
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:
This email sent to email@hidden