Remove references to chunklist. Fixes BUKKIT-5190

Commit c576054539790bdeb35285f62863d74b48c0782d removed the chunklist
collection stored in ChunkProviderServer, however it has been partially
restored in some places by 7e1ac0a77129b169704c1e222ff2deb3ab6cd2d2. As
not all references to this were restored, this has caused the chunklist
and chunks collections to become out of sync, resulting in a memory leak.

This commit removes chunklist from ChunkProviderServer again.
This commit is contained in:
frymaster 2013-12-17 15:54:48 +00:00 committed by Wesley Wolfe
parent 0e809d8318
commit fbdc3a7a74

View File

@ -30,7 +30,6 @@ public class ChunkProviderServer implements IChunkProvider {
private IChunkLoader f; private IChunkLoader f;
public boolean forceChunkLoad = false; // true -> false public boolean forceChunkLoad = false; // true -> false
public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>(); public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>();
private List chunkList = new ArrayList();
public WorldServer world; public WorldServer world;
// CraftBukkit end // CraftBukkit end
@ -128,7 +127,6 @@ public class ChunkProviderServer implements IChunkProvider {
} }
this.chunks.put(LongHash.toLong(i, j), chunk); // CraftBukkit this.chunks.put(LongHash.toLong(i, j), chunk); // CraftBukkit
this.chunkList.add(chunk);
chunk.addEntities(); chunk.addEntities();
// CraftBukkit start // CraftBukkit start
@ -305,7 +303,6 @@ public class ChunkProviderServer implements IChunkProvider {
// this.unloadQueue.remove(olong); // this.unloadQueue.remove(olong);
// this.chunks.remove(olong.longValue()); // this.chunks.remove(olong.longValue());
this.chunks.remove(chunkcoordinates); // CraftBukkit this.chunks.remove(chunkcoordinates); // CraftBukkit
this.chunkList.remove(chunk);
} }
} }
// CraftBukkit end // CraftBukkit end