failed displayLink invalidate (iOS)

hi.
I don’t speak English well, so I need your understand.
I tried to end CCDirector and restart CCApplication’s main loop.
then displayLink occurred a EXC_BAD_ACCESS error and kill my application at setAnimationInterval class.
I didn’t call AppController. instead I called my custom class similar to AppController.
because I want to distribute framework as my project.
I need your help.

my logic is this:

call this method,
cocos2d::CCDirector::sharedDirector()->end();

and after call like this.
cocos2d::CCApplication::sharedApplication().run();

I figured out this issue by my self.
It had wrong singletone pattern in CCDirectorCaller class. I changed that.
and I wanted to reuse cocos2dx’s main loop at UIViewController.
so I changed memory management of some classes in cocos2dx.

1 Like