未验证 提交 4784c122 编写于 作者: G Gen Lu 提交者: GitHub

Merge pull request #38655 from genlu/FixLeak

Fix a memory leak in BackgroundCompiler
......@@ -71,7 +71,17 @@ private void OnWorkspaceChanged(object sender, WorkspaceChangeEventArgs args)
case WorkspaceChangeKind.SolutionChanged:
case WorkspaceChangeKind.ProjectRemoved:
Rebuild(args.NewSolution);
if (args.NewSolution.ProjectIds.Count == 0)
{
// Close solution no longer triggers a SolutionRemoved event,
// so we need to make an explicitly check for ProjectRemoved event.
CancelBuild(releasePreviousCompilations: true);
}
else
{
Rebuild(args.NewSolution);
}
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册