Add applicationWillTerminate() interface into CCApplication?

Hello,

Is there any plan that add applicationWillTerminate() interface into CCApplication?
So I can do some custom final clean-up tasks in it.
And if not, where is the best place can we put the clean-up codes now?

Thanks.

1 Like

Before we add this method offcially, you can easily hack the source, add this method into CCApplication, and invoke it from AppController.mm

I’m voting for this too :slight_smile:

Already hacked CCApplication, but then after updating source to the latest version of cocos2d-x, I have to do it again :frowning:

Yes, this would be useful.

Any progress on this? I’m getting read access violations while ending testing sessions in Visual Studio because the cocos thread’s context is destroyed before my logic thread. I’d need to join the logic thread in a function like applicationWillTerminate(). Intercepting the exiting is possible in Director::end() but putting client code there is not really convenient.