From e4edbf288d05e7896438dd93b08eaf1273ae940f Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Sat, 16 Jul 2011 02:55:54 +0100 Subject: [PATCH] Don't use weak/soft references for keys, attempt to lessen memory impact further --- src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 2 +- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 2102250d7b..44ff1dfc49 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -19,7 +19,7 @@ import net.minecraft.server.WorldChunkManager; public class CraftChunk implements Chunk { private WeakReference weakChunk; - private final ConcurrentMap cache = new MapMaker().softKeys().softValues().makeMap(); + private final ConcurrentMap cache = new MapMaker().softValues().makeMap(); private WorldServer worldServer; private int x; private int z; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index bbda48d716..e0743eb1a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -38,7 +38,7 @@ public class CraftWorld implements World { private final WorldServer world; private Environment environment; private final CraftServer server = (CraftServer)Bukkit.getServer(); - private ConcurrentMap unloadedChunks = new MapMaker().weakKeys().weakValues().makeMap(); + private ConcurrentMap unloadedChunks = new MapMaker().weakValues().makeMap(); private final ChunkGenerator generator; private final List populators = new ArrayList();