Do I need to release a copied NSObjects - Objective-c
- by ncohen
Hi everyone,
I was wondering if I need to release a copied NSObject? For example, I create only one dictionary that I copy into an array:
Code:
for (int num = 0; num < [object count]; num++) {
[dictionary setObject:[object objectAtIndex:num] forKey:@"x"];
[array addObject:[dictionary copy]];
}
Do I have to release the dictionary? If yes, when?
Thanks