mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 20:04:59 +00:00
refactor: implement IDisposable
instead of calling custom Cleanup
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
550493b572
commit
75b7724d44
8 changed files with 42 additions and 34 deletions
|
@ -11,7 +11,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
|||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class WorkingCopy : ObservableObject
|
||||
public class WorkingCopy : ObservableObject, IDisposable
|
||||
{
|
||||
public bool IncludeUntracked
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ namespace SourceGit.ViewModels
|
|||
_repo = repo;
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
public void Dispose()
|
||||
{
|
||||
_repo = null;
|
||||
_inProgressContext = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue