mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
optimize<*>: reduce memory usage
This commit is contained in:
parent
ca19d65f0e
commit
57c4a8394c
8 changed files with 99 additions and 16 deletions
|
@ -189,12 +189,17 @@ namespace SourceGit.ViewModels {
|
|||
}
|
||||
|
||||
public void Close() {
|
||||
SelectedView = 0.0; // Do NOT modify. Used to remove exists widgets for GC.Collect
|
||||
|
||||
_watcher.Dispose();
|
||||
_histories.Cleanup();
|
||||
_workingCopy.Cleanup();
|
||||
_stashesPage.Cleanup();
|
||||
|
||||
_watcher = null;
|
||||
_histories = null;
|
||||
_workingCopy = null;
|
||||
_stashesPage = null;
|
||||
_selectedView = null;
|
||||
_isSearching = false;
|
||||
_searchCommitFilter = string.Empty;
|
||||
|
||||
|
@ -205,8 +210,6 @@ namespace SourceGit.ViewModels {
|
|||
_tags.Clear();
|
||||
_submodules.Clear();
|
||||
_searchedCommits.Clear();
|
||||
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
public void OpenInFileManager() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue