Skip to content
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

Dispose of ITextDocument(s) when closing preview view #75551

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Oct 17, 2024

Resolves #75492

Debugged and verified that the language client now unhooks from these buffers.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 17, 2024
@dibarbet dibarbet force-pushed the inert_preview_content branch from 785d7f8 to 5c40bed Compare October 17, 2024 19:08
@dibarbet dibarbet changed the title Change preview buffer content type to inert on close to unhook langua… Change preview buffer content type to inert when closing preview view Oct 17, 2024
@dibarbet dibarbet marked this pull request as ready for review October 17, 2024 19:10
@dibarbet dibarbet requested a review from a team as a code owner October 17, 2024 19:10
@dibarbet
Copy link
Member Author

After talking with Jason/Kayle offline - we decided to go a different route. Now we instead just dispose of the ITextDocument we create (it is IDisposable already, but we weren't disposing). There is a corresponding change on the LSP client side to ensure the diagnostics state is removed - https://devdiv.visualstudio.com/DevDiv/_git/VSLanguageServerClient/pullrequest/586188

@jasonmalinowski
Copy link
Member

@dibarbet Don't forget to change the PR title.

@dibarbet dibarbet changed the title Change preview buffer content type to inert when closing preview view Dispose of ITextDocument(s) when closing preview view Oct 17, 2024
@dibarbet dibarbet merged commit 7d58a7f into dotnet:main Oct 18, 2024
25 checks passed
@dibarbet dibarbet deleted the inert_preview_content branch October 18, 2024 22:11
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 18, 2024
@akhera99 akhera99 modified the milestones: Next, 17.13 P1 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LightBulb Preview buffer leaks via LSP
5 participants