Issue #248 Freeing memory before loading new file

This commit is contained in:
Jindra Petk
2013-07-19 11:42:56 +02:00
parent a5b1d1cc71
commit d05f94afa5
5 changed files with 75 additions and 55 deletions

View File

@@ -252,6 +252,11 @@ public class Main {
public static boolean openFile(String swfFile) {
if (mainFrame != null) {
mainFrame.setVisible(false);
Helper.emptyObject(mainFrame);
swf = null;
mainFrame = null;
Cache.clearAll();
System.gc();
}
Main.file = swfFile;
if (Main.loadingDialog == null) {