Memory Leak: `SophisticatedCore` static reference to `MinecraftServer`
JoshieGemFinder opened this issue ยท 1 comments
Describe the bug
The SophisticatedCore class contains a static reference to MinecraftServer in the form of private static MinecraftServer currentServer
This field is not set to null when the singleplayer integrated server is closed, causing the now-closed currentServer to leak.
To fix this memory leak, either:
- bind to
ServerLifecycleEvents.SERVER_STOPPEDand setcurrentServerto null - replace the
currentServerfield with aWeakReference
To Reproduce
N/A
Expected behavior
N/A
Screenshots
N/A
Versions
1.21.1-1.2.9.1.140