Пример #1
0
        public Chunk *CreateChunk()
        {
            EnsureCapacity();

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

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

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

            MemoryUtility.Free(this.chunks);
        }