File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/VisualStudio/Core/Def/ProjectSystem Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1420,8 +1420,9 @@ protected override void Dispose(bool finalize)
14201420 _textBufferFactoryService . TextBufferCreated -= AddTextBufferCloneServiceToBuffer ;
14211421 _projectionBufferFactoryService . ProjectionBufferCreated -= AddTextBufferCloneServiceToBuffer ;
14221422
1423- // Make sure we unsubscribe this, or otherwise this will cause a leak in unit tests since the UIContext for SolutionClosing is a static that is shared
1424- // across all tests.
1423+ // UIContext.FromUIContextGuid internally has a map from the GUID to the context object itself that is stored in a static;
1424+ // if we don't unsubscribe, it will leak our workspace object which can cause memory leaks in tests that create a whole MEF container
1425+ // per test.
14251426 _solutionClosingContext ? . UIContextChanged - = SolutionClosingContext_UIContextChanged ;
14261427 }
14271428
You can’t perform that action at this time.
0 commit comments