System.Net.Http.WinHttpRequestState.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            // No need to suppress finalization since the finalizer is not overridden and the class is sealed.
            Dispose(true);
        }
        #endregion

Same methods

WinHttpRequestState::Dispose ( bool disposing ) : void

Usage Example

Esempio n. 1
0
        protected override void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                _disposed = true;

                if (disposing)
                {
                    // TODO (Issue 2508): Pinned buffers must be released in the callback, when it is guaranteed no further
                    // operations will be made to the send/receive buffers.
                    if (_cachedReceivePinnedBuffer.IsAllocated)
                    {
                        _cachedReceivePinnedBuffer.Free();
                    }

                    if (_state.RequestHandle != null)
                    {
                        _state.RequestHandle.Dispose();
                        _state.RequestHandle = null;
                    }

                    _state.Dispose();
                }
            }

            base.Dispose(disposing);
        }
All Usage Examples Of System.Net.Http.WinHttpRequestState::Dispose