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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -