From 9475a966ca732deb58b2d141bfc65390419dcaa9 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 19 Nov 2022 21:19:20 +0900 Subject: - Prevent Reference Leak via ProtectionDomain - Prevent Reference Leak via ThreadDownloadImageData (set imagebuffer to null) Signed-off-by: syeyoung --- .../java/kr/syeyoung/dungeonsguide/launcher/loader/DGClassLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'loader/src/main/java/kr/syeyoung') diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/loader/DGClassLoader.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/loader/DGClassLoader.java index 4a902d8d..b7ead0f0 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/loader/DGClassLoader.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/loader/DGClassLoader.java @@ -1,5 +1,6 @@ package kr.syeyoung.dungeonsguide.launcher.loader; +import kr.syeyoung.dungeonsguide.launcher.Main; import kr.syeyoung.dungeonsguide.launcher.events.DGAwareEventSubscriptionTransformer; import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraftforge.fml.relauncher.ReflectionHelper; @@ -77,7 +78,7 @@ public abstract class DGClassLoader extends ClassLoader implements ByteStreamURL } if (res != null) { res = eventSubscriptionTransformer.transform(name, name, res); - return defineClass(name, res, 0, res.length); + return defineClass(name, res, 0, res.length, Main.class.getProtectionDomain()); } else { throw new ClassNotFoundException(name); } -- cgit