Problem with states and memory


hello, I have a problem with jme states when i use the cleane method does not release the memory of states that are detach.
any ideas?
thanks

  
        
          GameStateManager.getInstance().attachChild(instrucciones);
          GameStateManager.getInstance().activateChildNamed("instrucciones");
          GameStateManager.getInstance().detachChild("inicio");
          GameStateManager.getInstance().cleanup();

I don't know if I understand correctly, but if what you say is that, after detaching a child you would like for jME to cleanup that child as well, then I think that makes sense. If it is detached, you are responsible for cleaning it up yourself. The code doesn't have a reference to it anymore.