System.Net.Http.WinHttpRequestCallback.OnRequestHandleClosing C# (CSharp) Method

OnRequestHandleClosing() private static method

private static OnRequestHandleClosing ( WinHttpRequestState state ) : void
state WinHttpRequestState
return void
        private static void OnRequestHandleClosing(WinHttpRequestState state)
        {
            Debug.Assert(state != null, "OnRequestSendRequestComplete: state is null");
            
            // This is the last notification callback that WinHTTP will send. Therefore, we can
            // now explicitly dispose the state object which will free its corresponding GCHandle.
            // This will then allow the state object to be garbage collected.
            state.Dispose();
        }