How to reduce Texture(M) value

As the topic said , how to reduce Texture(M) value ?



thank you in advance :slight_smile:

Use less textures? ^^ Theres a new TextureAtlas class that allows you to combine textures.

Sorry , I mean that I have many textures that must be load and can’t be combined. But only some (not all) are show at the same time.



However, each time the textures are show, it keep increasing the Texture(M) value although I clear the cache in Desktop assetmanager , set the spatial of Texture reference to null, and at some point The Out-of-memory are throw.



Is this something that I miss to clear Textures that are load into the memory and not be use anymore ?



Thanks you in advance :slight_smile:

First of all wich jme reviison / version you are using, a few month ago at least there was a bug that caused a bug exactly like you described, so if your jme is quite old, I recomment to try a newer version.

I use nightly version which update every weeks. However, this project is created by the stable version ( including Android mobile project) , is jme automaticlly update the all jme.jar during build process right ?

If the Textures(M) value doesn’t go down, it usually means you’re loading textures but don’t get rid of them later on. E.g. you have hard references to them somewhere in the code.