Skip to content

debt: cleanup leaks#293212

Merged
connor4312 merged 1 commit intomainfrom
connor4312/293200
Feb 6, 2026
Merged

debt: cleanup leaks#293212
connor4312 merged 1 commit intomainfrom
connor4312/293200

Conversation

@connor4312
Copy link
Member

refs #293200

Copilot AI review requested due to automatic review settings February 5, 2026 20:41
@connor4312 connor4312 enabled auto-merge February 5, 2026 20:41
@connor4312 connor4312 self-assigned this Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses disposable lifecycle leaks by properly registering event subscriptions for cleanup. The changes ensure that IDisposable objects created from event subscriptions are either added to DisposableStores for later cleanup or converted to one-time listeners using Event.once().

Changes:

  • Fixed event subscription leak in testingContentProvider by registering model.onWillDispose() to the DisposableStore
  • Converted peek.onDidClose() to Event.once() in testingOutputPeek to prevent duplicate subscriptions
  • Fixed picker event subscription leaks in mcpRegistry by adding onDidAccept and onDidHide listeners to the DisposableStore
  • Fixed quickpick event subscription leaks in mcpCommandsAddConfiguration by adding event listeners to the DisposableStore

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/testing/common/testingContentProvider.ts Registered model.onWillDispose() to DisposableStore to ensure cleanup when model is disposed
src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts Converted peek.onDidClose() to Event.once() since the event only fires once per peek instance
src/vs/workbench/contrib/mcp/common/mcpRegistry.ts Added picker.onDidAccept() and picker.onDidHide() subscriptions to DisposableStore for proper cleanup
src/vs/workbench/contrib/mcp/browser/mcpCommandsAddConfiguration.ts Added quickpick event subscriptions to DisposableStore and fixed disposal order

@connor4312 connor4312 merged commit e424bfc into main Feb 6, 2026
27 of 28 checks passed
@connor4312 connor4312 deleted the connor4312/293200 branch February 6, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants