You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This field holds ServerLevel instances and is not cleared when the world closes and those levels are no longer valid. This causes the ServerLevel, and anything that it references, to stick around in memory despite no longer being used after the world is closed and a new one opened.
This can be solved by either replacing it with a WeakHashMap, which will let the garbage collector empty it when the levels are no longer in use elsewhere, or by adding a listener to the level unload event and removing levels when that event triggers.
AlexsMobs/src/main/java/com/github/alexthe666/alexsmobs/event/ServerEvents.java
Line 109 in 0d7bea8
This field holds ServerLevel instances and is not cleared when the world closes and those levels are no longer valid. This causes the ServerLevel, and anything that it references, to stick around in memory despite no longer being used after the world is closed and a new one opened.
This can be solved by either replacing it with a WeakHashMap, which will let the garbage collector empty it when the levels are no longer in use elsewhere, or by adding a listener to the level unload event and removing levels when that event triggers.
Originally discovered by @pietro-lopes and @KostromDan but neither bothered reporting it.
The text was updated successfully, but these errors were encountered: