Login  Register

Re: JOGL Texture Memory Management

Posted by r.jaoui on Mar 29, 2021; 8:34am
URL: https://forum.jogamp.org/JOGL-Texture-Memory-Management-tp4041055p4041066.html

Yeah I stumbled across java.sun.Cleaner, I'll try to implement it to clean up my Buffers, but although they cause a bit of memory usage, they don't seem to cause a leak (maybe they're natively deallocated in their finalize() method?)

The leak really looked like it was caused by OpenGL Textures, that are really unmanaged. My issue (the error message) could be caused by the fact that I just called the super.finalize() method of my Image object before destroying the textures (which needs access to the initial IntBuffer... does the finalize() method dereference the object's variables or something of the sort?). I'll test it out when I get back to this, a bit later on today :)

Thank you for your help :)