コード例 #1
0
ファイル: ViewDrawNavRibbonTab.cs プロジェクト: yp25/Krypton
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_mementos != null)
                {
                    // Dispose of all the mementos in the array
                    foreach (IDisposable memento in _mementos)
                    {
                        if (memento != null)
                        {
                            memento.Dispose();
                        }
                    }

                    _mementos = null;
                }

                if (_buttonManager != null)
                {
                    _buttonManager.Destruct();
                    _buttonManager = null;
                }
            }

            base.Dispose(disposing);
        }
コード例 #2
0
        /// <summary>
        /// Release unmanaged and optionally managed resources.
        /// </summary>
        /// <param name="disposing">Called from Dispose method.</param>
        protected override void Dispose(bool disposing)
        {
            if (_buttonManager != null)
            {
                _buttonManager.Destruct();
                _buttonManager = null;
            }

            // Must call base class to finish disposing
            base.Dispose(disposing);
        }