Repository navigation
debt - fix some leaks found by copilot - #293685
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses event-listener and event-subscription leaks across several workbench components by ensuring subscriptions are properly registered with the owning DisposableStore/Disposable lifecycle.
Changes:
- Dispose DOM event listeners in
WalkThroughPartvia the existingaddEventListener+DisposableStorepattern. - Register remote terminal channel event subscriptions with
_registerso they are disposed with the backend. - Ensure editor/widget-scoped event subscriptions in Interactive Editor, Edit Sessions UI, and Server services are disposed appropriately (including DPR monitor cleanup).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts | Ensures the click handler is disposed with this.disposables using the existing disposable DOM-listener helper. |
| src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts | Registers remote channel event listeners with _register to avoid leaking backend subscriptions. |
| src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts | Moves previously untracked editor/config subscriptions into _widgetDisposableStore so they’re cleared on input changes. |
| src/vs/workbench/contrib/editSessions/browser/editSessions.contribution.ts | Disposes the extension-change listener with the quick pick’s DisposableStore. |
| src/vs/server/node/serverServices.ts | Ensures the log level change listener is disposed via the passed-in disposables. |
| src/vs/base/browser/pixelRatio.ts | Disposes the matchMedia listener on DevicePixelRatioMonitor disposal to prevent lingering window listeners. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.