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

Commit 7fb09a3

Browse files
committed
Keep reference to TreeChanges and Dispose
1 parent c1746ae commit 7fb09a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/GitHub.App/ViewModels/PullRequestDetailViewModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ public async Task Load(string remoteRepositoryOwner, IPullRequestModel pullReque
387387
CommentCount = pullRequest.Comments.Count + pullRequest.ReviewComments.Count;
388388
Body = !string.IsNullOrWhiteSpace(pullRequest.Body) ? pullRequest.Body : Resources.NoDescriptionProvidedMarkdown;
389389

390-
var changes = await pullRequestsService.GetTreeChanges(LocalRepository, pullRequest);
391-
ChangedFilesTree = (await CreateChangedFilesTree(pullRequest, changes)).Children.ToList();
390+
using (var changes = await pullRequestsService.GetTreeChanges(LocalRepository, pullRequest))
391+
{
392+
ChangedFilesTree = (await CreateChangedFilesTree(pullRequest, changes)).Children.ToList();
393+
}
392394

393395
var localBranches = await pullRequestsService.GetLocalBranches(LocalRepository, pullRequest).ToList();
394396

0 commit comments

Comments
 (0)