Beginner asset management question

Hi!

I started using jMonkeyEngine recently. I’m starting to like it very much, but there are still some things I do not understand.

Essentially how do you free resources after they are not needed? I couldn’t find any information about this :confused:



Is node.detachAllChildren() or node.removeFromParent() sufficient?



What about Physics? Is bulletAppState.getPhysicsSpace().removeAll(node) sufficient?



thanks a lot :slight_smile:

yep just detach the children and make sure you don’t have any extra references to those objects in your code. The garbage collector will take care of the non referenced objects for you.