remove sprite from parent

remove sprite from parent
0.0 0


I have a sprite which is a Targeted Delegate.when I call removeFromParentAndCleanup() in its ccTouchEnded function the program crashed.What’s the problem and what should i do?

Question about Touch Event

You should implement destroy() and keep() declared in CCTouchDelegate.
You should call release() in destroy() and retain() in keep().

Because CCTouchDelegate doesn’t inherit from CCObject, so it declares
these functions to do the same thing.


thank you:)