iphonecocos2d[superonexit];发生触摸事件时导致碰撞。

iphonecocos2d[superonexit];发生触摸事件时导致碰撞。,iphone,cocos2d-iphone,function-exit,Iphone,Cocos2d Iphone,Function Exit,请帮忙 当我使用: -(void) onExit { [super onExit]; } 如果在调用onExit后的下一个场景中触摸屏幕,我的应用程序将崩溃。错误指向: -(void) touches:(NSSet*)touches withEvent:(UIEvent*)event withTouchType:(unsigned int)idx 在“CCTouchDispatcher.m”中。然而,当我删除[super-onExit];行,它不会崩溃 任何建议都将不胜感激!谢谢 [supe

请帮忙

当我使用:

-(void) onExit {
[super onExit];
}
如果在调用onExit后的下一个场景中触摸屏幕,我的应用程序将崩溃。错误指向:

-(void) touches:(NSSet*)touches withEvent:(UIEvent*)event withTouchType:(unsigned int)idx
在“CCTouchDispatcher.m”中。然而,当我删除[super-onExit];行,它不会崩溃


任何建议都将不胜感激!谢谢

[super-onExit]是必需的,否则触摸处理将被禁用-这解释了为什么如果您删除它,它不会崩溃


您有一个内存问题,很可能是某个对象在没有从CCTouchDispatcher中删除的情况下被释放。是您的朋友。

谢谢您的回复!我会看看能从NSZombieEnable中找到什么,并让您知道它是否有效。