Fixed: #1627 Previously decompiled scripts not cached

Fixed: SWF is not garbage collected on close in some situations
Fixed: AS1/2 script search does not show all results
This commit is contained in:
Jindra Petřík
2021-02-27 20:46:02 +01:00
parent e308c00601
commit 28380d1d34
12 changed files with 131 additions and 22 deletions

View File

@@ -989,17 +989,23 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
i--;
}
}
for (SWF swf : swfsToClose) {
Main.searchResultsStorage.destroySwf(swf);
}
swfs.remove(swfList);
oldItem = null;
clear();
updateUi();
List<SWF> swfs2 = new ArrayList<>(swfList);
for (SWF swf : swfs2) {
for (SWF swf : swfsToClose) {
swf.clearTagSwfs();
}
refreshTree();
mainMenu.updateComponents(null);
previewPanel.clear();
return true;
}
@@ -1883,7 +1889,6 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
if (searchDialog.getCurrentScope() == SearchDialog.SCOPE_ALL_FILES) {
Set<SWF> allSwfs = getAllSwfs();
for (SWF s : allSwfs) {
if (s.isAS3()) {
scopeAs3.put(s, s.getAS3Packs());
@@ -2791,9 +2796,12 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
tagTree.updateSwfs(swfs);
if (treeItem != null) {
SWF treeItemSwf = treeItem.getSwf().getRootSwf();
if (this.swfs.contains(treeItemSwf.swfList)) {
setTagTreeSelectedNode(treeItem);
SWF swf = treeItem.getSwf();
if (swf != null) {
SWF treeItemSwf = swf.getRootSwf();
if (this.swfs.contains(treeItemSwf.swfList)) {
setTagTreeSelectedNode(treeItem);
}
}
}