示例#1
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 + ". ****** ");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

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

                if (helpProvider != null)
                {
                    helpProvider.Dispose();
                }
            }
            m_cache      = null;
            m_fs         = null;
            m_highestPOS = null;
            m_poses      = null;
            m_mediator   = null;
            m_cache      = null;
            helpProvider = null;

            base.Dispose(disposing);
        }
        /// -----------------------------------------------------------------------------------
        /// <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, "****** 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_currentImage != null)
                {
                    m_currentImage.Dispose();
                }

                if (m_helpProvider != null)
                {
                    m_helpProvider.Dispose();
                }
            }
            m_currentImage = null;
            base.Dispose(disposing);
        }
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        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 (m_helpProvider != null)
                {
                    m_helpProvider.Dispose();
                }
            }
            if (m_cache != null)
            {
                IVwCacheDa cda = m_cache.MainCacheAccessor as IVwCacheDa;
                cda.CacheVecProp(m_cache.LangProject.Hvo, m_fakeFlid, null, 0);
                cda     = null;
                m_cache = null;
            }
            m_ctxt        = null;
            m_mediator    = null;
            m_bvList      = null;
            m_valuesCombo = null;

            base.Dispose(disposing);
        }
示例#4
0
 public static void Dispose()
 {
     if (provider != null)
     {
         provider.Dispose();
     }
     provider = null;
 }
		/// <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 + ". ****** ");
			// Must not be run more than once.
			if (IsDisposed)
				return;

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

			base.Dispose(disposing);
		}