Google.Protobuf.CodedInputStream.Dispose C# (CSharp) Method

Dispose() public method

Disposes of this instance, potentially closing any underlying stream.
As there is no flushing to perform here, disposing of a CodedInputStream which was constructed with the leaveOpen option parameter set to true (or one which was constructed to read from a byte array) has no effect.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            if (!leaveOpen)
            {
                input.Dispose();
            }
        }

Usage Example

Example #1
0
        /// <summary>
        /// clear Pool
        /// </summary>
        public static void PoolDispose()
        {
#if POOL
            if (_sharedInputSteam != null)
            {
                _sharedInputSteam.Dispose();
                _sharedInputSteam = null;
            }

            if (_sharedOutSteam != null)
            {
                _sharedOutSteam.Dispose();
                _sharedOutSteam = null;
            }
#endif
        }
All Usage Examples Of Google.Protobuf.CodedInputStream::Dispose