Significant sprite packing memory leak fixes
additional thanks to GlFolker for reporting issues with undisposed content icon pixmaps
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user