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
Post a Comment