/// <summary> /// Invoked when application execution is being suspended. Application state is saved /// without knowing whether the application will be terminated or resumed with the contents /// of memory still intact. /// </summary> /// <param name="sender">The source of the suspend request.</param> /// <param name="e">Details about the suspend request.</param> private void OnSuspending(object sender, SuspendingEventArgs e) { SaveSessionTabs(); var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity LibraryManager?.Dispose(); DrivesManager?.Dispose(); deferral.Complete(); }
protected override void Dispose(bool disposing) { _uiThread.MustBeCalledFromUIThreadOrThrow(); try { if (_componentID != 0) { _compMgr.FRevokeComponent(_componentID); _componentID = 0; } if (_libraryManager != null) { _libraryManager.Dispose(); _libraryManager = null; } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { try { if (_componentID != 0) { IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { mgr.FRevokeComponent(_componentID); } _componentID = 0; } if (null != _libraryManager) { _libraryManager.Dispose(); _libraryManager = null; } } finally { base.Dispose(disposing); } }
public void Dispose() { Logger.Log.Debug("Disposing"); ActiveLibrary = null; Libraries.Clear(); Libraries = null; ActiveProject = null; Projects.Clear(); Projects = null; CommandManager.Dispose(); CommandManager = null; LibraryManager.Dispose(); LibraryManager = null; WindowManager.Dispose(); WindowManager = null; Logger.Log.Debug("Disposed"); }