Significant sprite packing memory leak fixes

additional thanks to GlFolker for reporting issues with undisposed content icon pixmaps
This commit is contained in:
Anuken
2024-03-03 14:19:27 -05:00
parent bb909ab6fb
commit ac15b94978
7 changed files with 23 additions and 3 deletions
+6 -2
View File
@@ -97,8 +97,12 @@ public class MultiPacker implements Disposable{
@Override
public void dispose(){
for(PixmapPacker packer : packers){
packer.dispose();
for(int i = 0; i < PageType.all.length; i ++){
var packer = packers[i];
//the UI packer's image is later used when merging with the font, don't dispose it
if(i != PageType.ui.ordinal()){
packer.forceDispose();
}
}
}