ios - Proper Memory Management for this line? (Cocos2D) -


i getting following line leak in xcode:

somesprite = [[ccsprite alloc] initwithfile:(nsstring*)obj]; 

i know alloc there thought cocos2d handled of memory management. anyway how should handle line in order there not leak?

should use autorelease or there more it?

thanks!

usually, more preferable use static constructors return autoreleased objects. case be

[ccsprite spritewithfile:(nsstring*)obj]; 

it retained when add parent


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -