objective c - What happens when I remove unretained objects from an NSMutableSet -
i have nsmutableset of sprites each declared thusly:
spriteentity * newprojectile = [ccsprite spritewithfile:@"tiles.png" rect:cgrectmake(48,0,16,16)];
now, these stored in nsmutableset retained (created calling alloc , init). when call removeobject on 1 of spriteentities, happens it?
i assume garbage collection gets them, know sure.
thanks
removing object collection drops reference count one. if no other reference points object, reference count reaches 0 , deallocated.
Comments
Post a Comment