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.
精彩评论