Closed 333fps closed 3 months ago
@333fps Great catch!
@333fps Good afternoon, I have been looking into this and I believe that the changes here 8-memory-leak-during-during-the-font-creationdestruction-process should cover this issue. I still want to do some testing to verify.
I Dustin, i think this even eve simpler : https://github.com/333fps/Scion2D/commit/715d921d5038f9eb90947f29dd9260f055b00e0c as only 96 chars are used by the library(which is normal :):
@333fps Nice, that is way simpler. We can then just keep the void pointer an convert in the dtor. Great stuff. If you make the PR, I will merge it in. I am going to close the new branch I created today. Thanks.
@333fps Actually, I already have it open. I can make the change. Thanks a lot.
Fix has been merged 0931ef3 Thanks.
Description Memory leak during during the font creation/destruction process.
Here only 8 bytes (on 64bit machine) will be deallocated because the class does'nt know the size of 96*sizeof(stbtt_bakedchar) but only sizeof(void*) and misses the complete type.
Possible mitigation
etc :)