示例#1
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (m_mediator != null)
         {
             m_mediator.RemoveColleague(this);
         }
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
 }
示例#2
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
     if (disposing)
     {
         if (m_mediator != null)
         {
             m_mediator.RemoveColleague(this);
         }
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
 }
示例#3
0
        /// -----------------------------------------------------------------------------------
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged
        /// resources; <c>false</c> to release only unmanaged resources.
        /// </param>
        /// -----------------------------------------------------------------------------------
        protected override void Dispose(bool disposing)
        {
            //Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (m_mediator != null)
                {
                    m_mediator.RemoveColleague(this);
                }
            }
            m_mediator = null;

            base.Dispose(disposing);
        }