/// <summary>
        /// Dispose the preserved buffer.
        /// </summary>
        public void Dispose()
        {
            var returnStart = _buffer.Start.Segment;
            var returnEnd   = _buffer.End.Segment;

            while (true)
            {
                var returnSegment = returnStart;
                returnStart = returnStart?.Next;
                returnSegment?.ResetMemory();

                if (returnSegment == returnEnd)
                {
                    break;
                }
            }

            _buffer.ClearCursors();
        }