/// -----------------------------------------------------------------------------------
        /// <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)
        {
            System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (m_TriStateImages != null)
                {
                    m_TriStateImages.Dispose();
                }
            }

            m_TriStateImages = null;

            base.Dispose(disposing);
        }
Exemple #2
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_TriStateImages != null)
                {
                    m_TriStateImages.Dispose();
                }
            }

            m_TriStateImages = null;

            base.Dispose(disposing);
        }
Exemple #3
0
 private void CleanUp(bool disposing)
 {
     if (!this._disposed)
     {
         if (disposing)
         {
             _smallImageList.Dispose();
             _largeImageList.Dispose();
         }
     }
     _disposed = true;
 }
Exemple #4
0
        public void Dispose()
        {
            if (iList != null)
            {
                iList.Dispose();
                iList = null;
            }
            if (images != null)
            {
//        foreach (Bitmap m in images) {  //hv: Cloning the ImageList does not copy the bit maps, so they can still be alive at this point
//          m.Dispose();
//        }
                images.Clear();
            }
            images = null;
        }
Exemple #5
0
 public void Dispose()
 {
     if (iList != null)
     {
         iList.Dispose();
         iList = null;
     }
     if (images != null)
     {
         foreach (Bitmap m in images)
         {
             m.Dispose();
         }
         images.Clear();
     }
     images = null;
 }
Exemple #6
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (_rebar != null)
            {
                _rebar.DestroyHandle();
            }
            if (_imageList != null)
            {
                _imageList.Dispose();
            }
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }

            base.Dispose(disposing);
        }