Opc.Ua.AsyncResultBase.Dispose C# (CSharp) Method

Dispose() protected method

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
return void
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // stop the timer.
                if (m_timer != null)
                {
                    try
                    {
                        m_timer.Dispose();
                        m_timer = null;
                    }
                    catch (Exception)
                    {
                        // ignore 
                    }
                }

                // signal an waiting threads.
                if (m_waitHandle != null)
                {
                    try
                    {
                        m_waitHandle.Set();
                        m_waitHandle.Close();
                        m_waitHandle = null;
                    }
                    catch (Exception)
                    {
                        // ignore 
                    }
                }
            }
        }
        #endregion

Same methods

AsyncResultBase::Dispose ( ) : void