mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-30 08:34:59 +00:00
fix<*>: add cleanups to fix memory leak
This commit is contained in:
parent
13ab3d1eae
commit
c3b1b6d502
6 changed files with 37 additions and 10 deletions
|
@ -68,6 +68,15 @@ namespace SourceGit.Views.Widgets {
|
|||
watcher.StashChanged += UpdateStashes;
|
||||
watcher.TagChanged += UpdateTags;
|
||||
watcher.SubmoduleChanged += UpdateSubmodules;
|
||||
|
||||
Unloaded += (o, e) => {
|
||||
localBranches.Clear();
|
||||
remoteBranches.Clear();
|
||||
localBranchTree.ItemsSource = localBranches;
|
||||
remoteBranchTree.ItemsSource = remoteBranches;
|
||||
tagList.ItemsSource = new List<Models.Tag>();
|
||||
submoduleList.ItemsSource = new List<string>();
|
||||
};
|
||||
}
|
||||
|
||||
#region POPUP
|
||||
|
|
|
@ -27,6 +27,12 @@ namespace SourceGit.Views.Widgets {
|
|||
var watcher = Models.Watcher.Get(repo.Path);
|
||||
watcher.BranchChanged += UpdateCommits;
|
||||
watcher.TagChanged += UpdateCommits;
|
||||
|
||||
Unloaded += (o, e) => {
|
||||
cachedCommits.Clear();
|
||||
commitList.ItemsSource = cachedCommits;
|
||||
graph.SetData(cachedCommits, false);
|
||||
};
|
||||
}
|
||||
|
||||
#region DATA
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
public RevisionFiles() {
|
||||
InitializeComponent();
|
||||
Unloaded += (o, e) => treeFiles.ItemsSource = new List<FileNode>();
|
||||
}
|
||||
|
||||
public void SetData(string repo, string sha, Commands.Context cancelToken) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue