Memory Leak: `NiftyCarts` static reference to `MinecraftServer`
JoshieGemFinder opened this issue ยท 0 comments
Describe the bug
The NiftyCarts class contains a static reference to MinecraftServer in the form of public static MinecraftServer server
This field is not set to null when the singleplayer integrated server is closed, causing the now-closed server to leak.
To fix this memory leak, either:
- bind to
ServerLifecycleEvents.SERVER_STOPPEDand setserverto null - replace the
serverfield with aWeakReference
To Reproduce
N/A
Expected behavior
N/A
Screenshots
N/A
Additional Information:
- Version: NiftyCarts 21.0.1