From 2ea447dbfdc48dc9c976b7b5df6cd87086016b25 Mon Sep 17 00:00:00 2001 From: hailong Date: Fri, 22 Mar 2013 15:02:46 +0800 Subject: [PATCH] Update CCDirectorCaller.mm First destroy CCDirector instance with cocos2d::CCDirector::sharedDirector()->end() Then create new CCDirector instance with cocos2d::CCApplication::sharedApplication()->run(); APP will crash at CCApplication::setAnimationInterval [[CCDirectorCaller sharedDirectorCaller] setAnimationInterval: interval ]; --- cocos2dx/platform/ios/CCDirectorCaller.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos2dx/platform/ios/CCDirectorCaller.mm b/cocos2dx/platform/ios/CCDirectorCaller.mm index b39373449e..4fcb32fbed 100644 --- a/cocos2dx/platform/ios/CCDirectorCaller.mm +++ b/cocos2dx/platform/ios/CCDirectorCaller.mm @@ -51,6 +51,7 @@ static id s_sharedDirectorCaller; +(void) destroy { [s_sharedDirectorCaller release]; + s_sharedDirectorCaller = nil; } -(void) alloc