Potential memory leak
coderbot16 opened this issue ยท 3 comments
SkinUtil calls NativeImage#untrack()
, seemingly in an attempt to deallocate the NativeImage object:
However, NativeImage#untrack()
does not deallocate the texture - rather, it removes it from LWJGL's leak tracking, meaning that not only does this code potentially leak memory, it does so in a way that is invisible to LWJGL's debugging tools.
It seems like you intended to call NativeImage#close()
.
Thanks for that info. That's quite an unfortunate name, I'll fix it across my projects.
You're welcome, and yeah, I wish the name were a little more indicative of what it does, maybe it would be nicer if it were named NativeImage#leakSilently()
instead.