-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly dispose the SymbolSearchEngine #73464
Conversation
public void Dispose() | ||
{ | ||
// Nothing to do for the no-op version. | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the actual Dispose we care about already exists, but is currently not called through any codepaths. It is here:
roslyn/src/Features/Core/Portable/SymbolSearch/Windows/SymbolSearchUpdateEngineProxy.cs
Line 16 in 9b6dd87
public void Dispose() |
What thsi PR does is hook things up to ensure that it is called. To ensure that we actually dispose the RemoteServiceConnection instance we're holding onto.
@ToddGrun ptal |
_lazyUpdateEngine = SymbolSearchUpdateNoOpEngine.Instance; | ||
} | ||
|
||
updateEngine?.Dispose(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed so this searc-service release the underlying ISymbolSearchUpdateEngine, which will release the connection we have with the oop server.
public void Dispose() | ||
{ | ||
ISymbolSearchUpdateEngine? updateEngine; | ||
using (_gate.DisposableWait()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed while investigating post-VS shutdown issues with Dave.