Пример #1
0
        /// <inheritdoc/>
        private protected override void Resize(int newSize)
        {
            var newBuffer = allocator.Invoke(newSize, false);

            buffer.Memory.CopyTo(newBuffer.Memory);
            buffer.Dispose();
            buffer = newBuffer;
            AllocationCounter?.WriteMetric(newBuffer.Length);
        }
Пример #2
0
 /// <inheritdoc/>
 private protected override void Resize(int newSize)
 {
     buffer.Resize(newSize, false, allocator);
     AllocationCounter?.WriteMetric(buffer.Length);
 }