diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index a144b6da5..776af2ada 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -550,31 +550,37 @@ public class Main { public static void reloadApp() { if (debugDialog != null) { debugDialog.setVisible(false); + debugDialog.dispose(); debugDialog = null; } if (loadingDialog != null) { synchronized (Main.class) { if (loadingDialog != null) { loadingDialog.setVisible(false); + loadingDialog.dispose(); + loadingDialog = null; } - loadingDialog = null; } } if (proxyFrame != null) { proxyFrame.setVisible(false); + proxyFrame.dispose(); proxyFrame = null; } if (loadFromMemoryFrame != null) { loadFromMemoryFrame.setVisible(false); + loadFromMemoryFrame.dispose(); loadFromMemoryFrame = null; } if (loadFromCacheFrame != null) { loadFromCacheFrame.setVisible(false); + loadFromCacheFrame.dispose(); loadFromCacheFrame = null; } if (mainFrame != null) { mainFrame.setVisible(false); mainFrame.getPanel().closeAll(); + mainFrame.dispose(); mainFrame = null; } FontTag.reload(); @@ -855,7 +861,10 @@ public class Main { exit(); } if (Configuration.useRibbonInterface.get()) { + Stopwatch sw = Stopwatch.startNew(); View.setLookAndFeel(); + sw.stop(); + System.out.println("sw: " + sw.getElapsedMilliseconds()); } else { try { UIManager.put(SubstanceLookAndFeel.COLORIZATION_FACTOR, null); diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/src/com/jpexs/decompiler/flash/gui/MainFrame.java index a052743f0..7b472a723 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -1,16 +1,16 @@ /* * Copyright (C) 2010-2015 JPEXS - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -35,4 +35,6 @@ public interface MainFrame { public void setVisible(boolean b); public Window getWindow(); + + public void dispose(); }