public void Free(IBuffer buffer) { allBuffers.TryRemove(buffer, out _); memoryManager.ReleaseBytes(buffer.Capacity); }
public void ReleaseBytes(long amount) { Interlocked.Add(ref currentSize, -amount); underlyingManager?.ReleaseBytes(amount); }