JP Sarda [v1] small fix for director deallocation
Posts 32
Added by JP Sarda 11 months ago

As I'm running cocos2d-x into a uikit view, I have to create/end the director quite often. The CCDirectorCaller was not correctly deallocated when calling director->end(), here is a quick fix. It seems that you need to invalidate the displayLink in order to release the CCDirectorCaller.

In CCdirectorCaller.mm, cocos2d-x

Before fix

+(void) destroy {
[[s_sharedDirectorCaller release];
}

After fix

+(void) destroy {
[s_sharedDirectorCaller destroy];
[s_sharedDirectorCaller release]; s_sharedDirectorCaller=nil;
}
-(void) destroy {
[displayLink invalidate]; displayLink=nil;
}

Dominic Xue RE: [v1] small fix for director deallocation
Posts 2
Added by Dominic Xue 8 months ago

ha
I wanna made cocos view in storyboard and display in some viewcontroller
that's very useful for me


(1-1/1)