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?
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.