Skip to content

Conversation

@murataslan1
Copy link
Contributor

Identical to the fix in terminalTabbedView.ts: replaces a manual 'TODO' event listener in terminalView.ts with a robust Event.once pattern. Ensures proper disposal and prevents memory leaks during terminal connection state changes.

Copilot AI review requested due to automatic review settings January 2, 2026 12:44
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 replaces a manual event listener pattern with the more robust Event.once pattern in terminalView.ts. The change ensures proper lifecycle management by automatically disposing the event listener after its first invocation, preventing potential memory leaks when handling terminal connection state changes.

Key Changes:

  • Replaced this._register(this._terminalService.onDidChangeConnectionState(() => { with this._register(Event.once(this._terminalService.onDidChangeConnectionState)(() => {
  • Removed TODO comments about improving lifecycle management

@Tyriar Tyriar added this to the December / January 2026 milestone Jan 2, 2026
@Tyriar Tyriar enabled auto-merge January 2, 2026 16:28
@Tyriar Tyriar merged commit 51ff08c into microsoft:main Jan 2, 2026
17 checks passed
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.

3 participants