From 1775de1e743b8b9afaa3095047dcba1806d28695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 22 Jan 2023 21:33:27 +0100 Subject: [PATCH] Fixed Cache thread as daemon --- CHANGELOG.md | 1 + libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac04eb1a5..5337bd04b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ All notable changes to this project will be documented in this file. - [#1938] AS3 - initproperty compound operators, increment/decrement - [#1938] "Open loaded during play" Loader injection for Multiname types - AS3 - not using visitCode when not needed => faster decompilation +- Cache thread as daemon ## [18.3.2] - 2023-01-10 ### Removed diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java index 213945e06..96fa7ded5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java @@ -56,7 +56,7 @@ public class Cache implements Freed { private static final long CLEAN_INTERVAL = 5 * 1000; //5 seconds - private static Thread oldCleaner = null; + private static Thread oldCleaner = null; static { Runtime.getRuntime().addShutdownHook(new Thread() { @@ -90,6 +90,7 @@ public class Cache implements Freed { } } }; + oldCleaner.setDaemon(true); oldCleaner.setPriority(Thread.MIN_PRIORITY); oldCleaner.start(); }