Quote from: EgonOlsen on September 30, 2013, 12:09:26 PMjust with replaceTexture, the memory consumed gets more and more, and finally we get OOM.
Yes, most likely. I don't know exactly how you are doing things, but what you can't do is to remove a texture, add another one with the same name and expect the objects to reflect this change. If an object uses a texture and that texture should be changed so that all objects using it will be using the new one, it's better to use TextureManager.replaceTexture for that. Remove (as well as unload) is suitable only for textures that aren't in use anymore, i.e. there are no active object that use them.
is it OK for us to add unloadTexture after replaceTexture ?
ex.
Code Select
Texture oldTexture = ...
TextureManager.replaceTexture(name, newTexture);
TextureManager.unloadTexutre(fb,oldTexture);