diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-07-16 02:55:54 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-07-16 02:55:54 +0100 |
commit | e4edbf288d05e7896438dd93b08eaf1273ae940f (patch) | |
tree | 4e188a97bd5ad02af5527923714f377226bcd5f8 /src | |
parent | c101c3553bb668ce32c8e4a1e976c93d516815af (diff) | |
download | craftbukkit-e4edbf288d05e7896438dd93b08eaf1273ae940f.tar craftbukkit-e4edbf288d05e7896438dd93b08eaf1273ae940f.tar.gz craftbukkit-e4edbf288d05e7896438dd93b08eaf1273ae940f.tar.lz craftbukkit-e4edbf288d05e7896438dd93b08eaf1273ae940f.tar.xz craftbukkit-e4edbf288d05e7896438dd93b08eaf1273ae940f.zip |
Don't use weak/soft references for keys, attempt to lessen memory impact further
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 2 | ||||
-rw-r--r-- | 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 2102250d..44ff1dfc 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<net.minecraft.server.Chunk> weakChunk; - private final ConcurrentMap<Integer, Block> cache = new MapMaker().softKeys().softValues().makeMap(); + private final ConcurrentMap<Integer, Block> 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 bbda48d7..e0743eb1 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<Integer, CraftChunk> unloadedChunks = new MapMaker().weakKeys().weakValues().makeMap(); + private ConcurrentMap<Integer, CraftChunk> unloadedChunks = new MapMaker().weakValues().makeMap(); private final ChunkGenerator generator; private final List<BlockPopulator> populators = new ArrayList<BlockPopulator>(); |