What kind of object should be released in destructor by myself?

In the original object-c program, any object rendered by “alloc” and “init” (like “new” in c++) should be released(delete) at destructor by myself.

On the other side, object rendered by static function of a object, ex:NSString::stringWithXXXX is located at autorelease pool, so we don’t need to release it.

But, in cocos2dx, all objects are rendered by static function(ex: CCSprite::spriteFromXXX), so I am not sure if I need to release those objects at the destructor.

Can somebody give some guide about the memory management in cocos2dx?

Thanks~

You can use it like object-c, cocos2d-x borrow ideas from object-c.

Here is a good thread about your exact question…

http://www.cocos2d-x.org/boards/6/topics/678?r=696