NetMQ.Core.SessionBase.Destroy C# (CSharp) Method

Destroy() public method

Terminate and release any contained resources. This cancels the linger-timer if that exists, and terminates the protocol-engine if that exists.
public Destroy ( ) : void
return void
        public override void Destroy()
        {
            Debug.Assert(m_pipe == null);

            // If there's still a pending linger timer, remove it.
            if (m_hasLingerTimer)
            {
                m_ioObject.CancelTimer(LingerTimerId);
                m_hasLingerTimer = false;
            }

            // Close the engine.
            if (m_engine != null)
                m_engine.Terminate();
        }