Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 private protected override void Resize(int newSize)
 {
     buffer.Resize(newSize, false, allocator);
     AllocationCounter?.WriteMetric(buffer.Length);
 }