protected void OnDisable() { // Clear previous compilation errors from the output log. // ReSharper disable once DelegateSubtraction Undo.undoRedoPerformed -= UndoRedoPerformed; if (rootVisualElement != null) { if (m_ShortcutHandler != null) { rootVisualElement.parent.RemoveManipulator(m_ShortcutHandler); } rootVisualElement.UnregisterCallback <ValidateCommandEvent>(OnValidateCommand); rootVisualElement.UnregisterCallback <ExecuteCommandEvent>(OnExecuteCommand); } m_Store.Dispose(); m_GraphView?.UIController?.ClearCompilationErrors(); // ReSharper disable once DelegateSubtraction Selection.selectionChanged -= OnGlobalSelectionChange; m_PluginRepository?.Dispose(); EditorApplication.playModeStateChanged -= OnEditorPlayModeStateChanged; EditorApplication.pauseStateChanged -= OnEditorPauseStateChanged; AnalyticsHelper.Instance.SendAllUserActionsIncludingPendingNodeCreation(); }
protected override void OnStop() { Log.DebugFormat("Starting..."); try { _server?.Dispose(); _repository?.Dispose(); Log.InfoFormat("Stopped"); } catch (Exception e) { Log.ErrorFormat("Caught unexpected exception: {0}", e); throw; } }
public void TearDown() { _repository?.Dispose(); }