@Override
    public void cleanup() {
        if (debugAppState != null) {
            stateManager.detach(debugAppState);
            debugAppState = null;
        }
        stopPhysics();
        super.cleanup();
    }
Transition this state from terminating to detached. Should be invoked
only by a subclass or by the AppStateManager. Invoked once for each time
{@link #initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)}
is invoked.
jme3-jbullet/src/main/java/com/jme3/bullet/BulletAppState.java