NSMutableArray, NSMutableDictionary memory managment
NSMutableArray, NSMutableDictionary memory managment
- Subject: NSMutableArray, NSMutableDictionary memory managment
- From: Scott Price <email@hidden>
- Date: Thu, 11 Sep 2008 10:11:33 -0700
I'm wondering how NSMutableArray and NSMutableDictionary handle
objects if you add and object to them. I'm working on an iphone where
memory management is important and kinda iffy how these objects work.
Say if you allocate a temp object and add it to an NSMutableArray and
then release it afterwords, does the NSMutableArray not make a deep
copy and will lose the the variable?
example
NSMutableArray* arr = [[NSMutableArray]init];
NSString* bam = [[NSString alloc]initWithString:@"Shazam"];
[arr addObject:bam];
[release bam];
if i were to do this would arr lose the contents of bam?
_______________________________________________
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