Exemple #1
0
        public Chunk *CreateChunk()
        {
            EnsureCapacity();

            this.chunks[count] = ChunkPool.Rent(this.archetype);
            return(this.chunks[count++]);
        }
Exemple #2
0
        public void ReleaseChunk(int index)
        {
            Chunk *chunk = chunks[index];

            chunks[index] = chunks[--count];

            ChunkPool.Return(chunk);
        }
Exemple #3
0
        public void Dispose()
        {
            for (int i = 0; i < this.count; ++i)
            {
                ChunkPool.Free(this.chunks[i]);
            }

            MemoryUtility.Free(this.chunks);
        }