Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 81e29d3

Browse files
committed
Don't worry about auto-disposing
PullRequestDetailViewModel will be disposed in future commit.
1 parent c3d5335 commit 81e29d3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/GitHub.App/ViewModels/PullRequestDetailViewModel.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public sealed class PullRequestDetailViewModel : PanePageViewModelBase, IPullReq
7676
{
7777
this.vsGitExt = vsGitExt;
7878

79-
AutoDispose.DisposePrevious(this);
8079
vsGitExt.ActiveRepositoriesChanged += Refresh;
8180
}
8281

@@ -85,18 +84,6 @@ public void Dispose()
8584
vsGitExt.ActiveRepositoriesChanged -= Refresh;
8685
}
8786

88-
// HACK: This is a workaround for models not being automatically disposed.
89-
static class AutoDispose
90-
{
91-
static IDisposable previous;
92-
93-
internal static void DisposePrevious(IDisposable disposable)
94-
{
95-
previous?.Dispose();
96-
previous = disposable;
97-
}
98-
}
99-
10087
/// <summary>
10188
/// Initializes a new instance of the <see cref="PullRequestDetailViewModel"/> class.
10289
/// </summary>

0 commit comments

Comments
 (0)