I develop cocos2d-x android.
My question is when user press power button, is called onDestroy() after calling onPause(). This is connencted with memory leak problem? Why onDestroy() is called at that time? when it returns to app on Resume mode, it doesn't go to current screen. It goes to main screen. I think that it's connected with the problem- onDestroy() is called after calling onPause(). Is it right?
@Override public void onPause(){
super.onPause();
CCDirector.sharedDirector().pause();
}
@Override public void onDestroy(){
super.onDestroy();
CCDirector.sharedDirector().end();
}
Thank you for your help.