Paper/CraftBukkit-Patches/0065-Plug-World-Unload-Memory-Leak.patch

23 lines
882 B
Diff

From abf88361148d182536726699838388895efda957 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:02:59 +1000
Subject: [PATCH] Plug World Unload Memory Leak
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index f176e66..d4f3c51 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -11,7 +11,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockRedstoneTorch extends BlockTorch {
private boolean isOn;
- private static Map b = new HashMap();
+ private static Map b = new java.util.WeakHashMap(); // Spigot
private boolean a(World world, int i, int j, int k, boolean flag) {
if (!b.containsKey(world)) {
--
1.8.1.2