Ikemen-GO
Ikemen-GO copied to clipboard
OpenGL C library memory leak at SFFv2 loading.
Currently when loading SFFv2. At first glance, the code that causes it is at image.go#L558.
More info is needed on why the leak happens.
I think the code in image.go
is just a symptom of the leak, not its root cause. From what I can observe, if the Sff
object is destroyed, the textures are properly released as well.
However I have seen occurrences of Sff
objects not being destroyed when they’re being used by a Helper
. I will investigate more and post my findings.
Aside from that, relying on the GC to release textures does not seem like a good idea. 32-bit textures may be huge, but from the GC’s point of view, each of them occupies only a few bytes. It may decide that they’re not worth freeing.