开发者

Should we remove Child added by addChild method before going to next scene in cocos2d?

I am writing a small game in cocos2d. I am adding child

    [ self addChild: sprite1];  

Should I remove these before going to next scene by using

 [self removeChild: sprite1 cleanup:YES];   

D开发者_如何学编程oes it increase the performance in device ?

Thank You.


Short answer, no. The scene will do its own cleanup and release its child nodes when it deallocates. So as long as you send [super dealloc]; in your scene's - (void)dealloc you'll be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜