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 (_ribbonRadioButton != null)
{
// Must unhook to prevent memory leaks
_ribbonRadioButton.PropertyChanged -= new PropertyChangedEventHandler(OnRadioButtonPropertyChanged);
// Remove association with definition
_ribbonRadioButton.RadioButtonView = null;
_ribbonRadioButton = null;
}
}
base.Dispose(disposing);
}