@Override
        public void cleanup() {
            super.cleanup();
            //detach everything when we are detached
            application.getRootNode().detachChild(rootNode);
            application.getStateManager().detach(physicsState);
            cleanupData();
        }
WorldOfInception - Find the galaxy center ;)

@author normenhansen
jme3-examples/src/main/java/jme3test/games/WorldOfInception.java