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