Skip to content

Conversation

@yavanosta
Copy link
Contributor

Clean up previous observable every time we create a new one.

Fixes #273549

Copilot AI review requested due to automatic review settings October 27, 2025 13:02
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 fixes a memory leak in the InlineEditsGutterIndicator component by ensuring proper cleanup of observables. Each time the _state derived observable is recomputed, it creates a new observeLineOffsetRange observable but was not disposing the previous one, causing resources to accumulate.

Key Changes:

  • Added a _stateDisposables field to track disposables created within the derived observable
  • Implemented cleanup logic to dispose previous disposables before creating new ones
@hediet
Copy link
Member

hediet commented Oct 28, 2025

Thanks for the PR!

@hediet hediet enabled auto-merge (squash) October 28, 2025 10:27
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 28, 2025
@hediet hediet merged commit d60f13e into microsoft:main Oct 28, 2025
17 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants