private bool disposedValue = false; // 重複する呼び出しを検出するには protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { LinkConnectorControl.Dispose(); AssetXML?.Dispose(); AssetXML = null; OwnerCommandCanvas = null; } disposedValue = true; } }
protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { EditControl.Text = null; UpdateEvent = null; LostFocus -= ExitEditMode; AssetXML?.Dispose(); AssetXML = null; } disposedValue = true; } }