public void Dispose() { lock (_writeLock) { if (_handle == null) { return; } _handle.Dispose(); _handle = null; } }
public ResizeBufReader ToReader() { lock (_writeLock) { if (_handle == null) { throw new InvalidOperationException("ResizeBuf is not writable"); } var reader = new ResizeBufReader(_handle); _handle = null; return(reader); } }
internal ResizeBufReader(ResizeBufHandle handle) { _handle = handle; }
private ResizeBufWriter(ResizeBufHandle handle) { _handle = handle; }