Do I need to release a copied NSObjects - Objective-c

Posted by ncohen on Stack Overflow See other posts from Stack Overflow or by ncohen
Published on 2010-03-12T01:19:45Z Indexed on 2010/03/12 1:27 UTC
Read the original article Hit count: 322

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

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone