mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34: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
|
@ -96,6 +96,17 @@ namespace SourceGit.ViewModels {
|
|||
});
|
||||
}
|
||||
|
||||
public void Cleanup() {
|
||||
_repo = null;
|
||||
if (_changes != null) _changes.Clear();
|
||||
if (_visibleChanges != null) _visibleChanges.Clear();
|
||||
if (_changeTree != null) _changeTree.Clear();
|
||||
_selectedChange = null;
|
||||
_selectedNode = null;
|
||||
_searchFilter = null;
|
||||
_diffContext = null;
|
||||
}
|
||||
|
||||
public void NavigateTo(string commitSHA) {
|
||||
var repo = Preference.FindRepository(_repo);
|
||||
if (repo != null) repo.NavigateToCommit(commitSHA);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue