aboutsummaryrefslogtreecommitdiff
path: root/loader
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2022-11-19 21:19:20 +0900
committersyeyoung <cyoung06@naver.com>2022-11-19 21:19:20 +0900
commit9475a966ca732deb58b2d141bfc65390419dcaa9 (patch)
treec2d18daff44fcb39d56408120bc20f480b56f529 /loader
parent6701cc47ca7280ac18a7289a2dd314b1cc4852a8 (diff)
downloadSkyblock-Dungeons-Guide-9475a966ca732deb58b2d141bfc65390419dcaa9.tar.gz
Skyblock-Dungeons-Guide-9475a966ca732deb58b2d141bfc65390419dcaa9.tar.bz2
Skyblock-Dungeons-Guide-9475a966ca732deb58b2d141bfc65390419dcaa9.zip
- Prevent Reference Leak via ProtectionDomain
- Prevent Reference Leak via ThreadDownloadImageData (set imagebuffer to null) Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'loader')
-rw-r--r--loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/loader/DGClassLoader.java3
1 files changed, 2 insertions, 1 deletions
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);
}