From a897b0b94b6c67e1328e70938b6895610119d2d3 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 9 Apr 2020 18:27:34 -0700 Subject: [PATCH] Fix memory leak when unloading worlds The World instance wasn't freed from the forceSpawnMap and preventSpawnMap, keeping unloaded worlds around. --- .../WayofTime/bloodmagic/util/handler/event/GenericHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java index 93b9a135..7e4cb0cc 100644 --- a/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java +++ b/src/main/java/WayofTime/bloodmagic/util/handler/event/GenericHandler.java @@ -561,6 +561,8 @@ public class GenericHandler { filledHandMapMap.remove(world); attackTaskMapMap.remove(world); targetTaskMapMap.remove(world); + forceSpawnMap.remove(world); + preventSpawnMap.remove(world); PotionEventHandlers.flightListMap.remove(world); PotionEventHandlers.noGravityListMap.remove(world); }