ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupCheckBox.Dispose C# (CSharp) Method

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_ribbonCheckBox != null)
                {
                    // Must unhook to prevent memory leaks
                    _ribbonCheckBox.PropertyChanged -= new PropertyChangedEventHandler(OnCheckBoxPropertyChanged);

                    // Remove association with definition
                    _ribbonCheckBox.CheckBoxView = null;
                    _ribbonCheckBox = null;
                }
            }

            base.Dispose(disposing);
        }