private static string GetStringAndClear(PooledList <char> sb) { var str = sb.AsSpan().ToString(); sb.Clear(); return(str); }
public void Dispose() { if (_buffer != null) { ArrayPool <TToken> .Shared.Return(_buffer); _buffer = null; } _stream.Dispose(); _bookmarks.Clear(); _expecteds.Clear(); _expectedBookmarks.Clear(); }
public void OnError() { _list.Clear(); }