public void Dispose() { context = null; if (obj != null) { obj.FocusChange -= focusChange; } if (dataSourceDataView != null) { dataSourceDataView.Table.ColumnChanged -= Table_ColumnChanged; dataSourceDataView.Table.RowChanged -= Table_RowChanged; } obj = null; obj = null; objProperty = null; propertyInfo = null; dsProperty = null; column = null; try { if (ConverterFormat != null) { ConverterFormat.Dispose(); } } catch { } ConverterFormat = null; try { if (ConverterParse != null) { ConverterParse.Dispose(); } } catch { } ConverterParse = null; dataSourceDataView = null; dataSource = null; context = null; obj = null; objProperty = null; propertyInfo = null; dsProperty = null; column = null; }
void Form_Closed(object sender, EventArgs e) { try { if (BindingContext != null) { BindingContext.Dispose(); } } catch { } BindingContext = null; Closed -= Form_Closed; ToolDispose.disposeControl(this); }