Fixed #1875 Garbage collect SWF and its caches after closing it

This commit is contained in:
Jindra Petřík
2022-11-18 11:13:12 +01:00
parent 817b466242
commit 220f851ea9
4 changed files with 35 additions and 6 deletions

View File

@@ -459,7 +459,15 @@ public final class SWF implements SWFContainerItem, Timelined {
clearScriptCache();
frameCache.clear();
soundCache.clear();
clearImageCache();
clearShapeCache();
clearAbcListCache();
characters = null;
characterIdTags = null;
externalImages2 = null;
timeline = null;
if (dumpInfo != null) {
clearDumpInfo(dumpInfo);
@@ -2827,6 +2835,7 @@ public final class SWF implements SWFContainerItem, Timelined {
public void clearAllCache() {
characters = null;
characterIdTags = null;
externalImages2 = null;
timeline = null;
cyclicCharacters = null;
clearReadOnlyListCache();