public void cleanup() {
        AppState[] array = getStates();
        for (AppState state : array) {
            state.cleanup();
        }
    }
Calls cleanup on attached states, do not call directly.
jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java