public Chunk *CreateChunk() { EnsureCapacity(); this.chunks[count] = ChunkPool.Rent(this.archetype); return(this.chunks[count++]); }
public void ReleaseChunk(int index) { Chunk *chunk = chunks[index]; chunks[index] = chunks[--count]; ChunkPool.Return(chunk); }
public void Dispose() { for (int i = 0; i < this.count; ++i) { ChunkPool.Free(this.chunks[i]); } MemoryUtility.Free(this.chunks); }