diff --git a/src/Workspaces/Core/Portable/Workspace/Workspace.cs b/src/Workspaces/Core/Portable/Workspace/Workspace.cs index 73a3c4e8a740..1fda815b1444 100644 --- a/src/Workspaces/Core/Portable/Workspace/Workspace.cs +++ b/src/Workspaces/Core/Portable/Workspace/Workspace.cs @@ -318,6 +318,7 @@ static Solution UnifyLinkedDocumentContents(Solution oldSolution, Solution newSo // now, for any changed document, ensure we go and make all links to it have the same text/tree. newSolution = UpdateExistingDocumentsToChangedDocumentContents(newSolution, changedDocumentIds, projectToSiblingFlavors); + // Free the ArrayBuilders in projectToSiblingFlavors. The dictionary itself will be automatically freed at the end of this scope. projectToSiblingFlavors.FreeValues(); return newSolution;