public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _context.LastStreamSize(_sizeInBytes);
            var cur = _current;

            while (cur != null)
            {
                _context.ReturnMemory(cur.Allocation);
                cur = cur.Previous;
            }
            _disposed = true;
        }