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
|
@ -78,6 +78,17 @@ namespace SourceGit.ViewModels {
|
|||
_repo = repo;
|
||||
}
|
||||
|
||||
public void Cleanup() {
|
||||
_repo = null;
|
||||
if (_unstaged != null) _unstaged.Clear();
|
||||
if (_staged != null) _staged.Clear();
|
||||
if (_unstagedTree != null) _unstagedTree.Clear();
|
||||
if (_stagedTree != null) _stagedTree.Clear();
|
||||
_lastViewChange = null;
|
||||
_detailContext = null;
|
||||
_commitMessage = string.Empty;
|
||||
}
|
||||
|
||||
public bool SetData(List<Models.Change> changes) {
|
||||
var unstaged = new List<Models.Change>();
|
||||
var staged = new List<Models.Change>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue