Resourceful Config

Resourceful Config

73M Downloads

[Bug]: Memory Leak: `DedicatedServerInfo` static reference to `MinecraftServer`

JoshieGemFinder opened this issue ยท 0 comments

commented

Bug Description

The DedicatedServerInfo class contains a static reference to MinecraftServer in the form of private static MinecraftServer server

This field is not set to null when the singleplayer integrated server is closed (neither forge or fabric), causing the now-closed server to leak.

To fix this memory leak, either:

  • bind to each platform's respective "server closed" event and set server to null
  • replace the server field with a WeakReference

How to Reproduce?

N/A

Expected Behavior

N/A

Version

3.5.1

Mod Loader Version

Fabric 0.16.13, NeoForge 21.1.161

Mod Loader

N/A

Logs or additional context

No response