Skip to content

Refactor NativePythonFinderImpl for better disposable management#1144

Merged
karthiknadig merged 2 commits intomainfrom
specific-felidae
Feb 2, 2026
Merged

Refactor NativePythonFinderImpl for better disposable management#1144
karthiknadig merged 2 commits intomainfrom
specific-felidae

Conversation

@karthiknadig
Copy link
Member

@karthiknadig karthiknadig commented Feb 2, 2026

Fixes #1141

Improve management of disposables in the NativePythonFinderImpl class to enhance resource cleanup and prevent potential memory leaks.

Changes

  • Added class-level startDisposables array to track disposables created in start()
  • Updated dispose() to properly stop the worker pool and dispose all tracked resources
  • Ensures event handlers (log, telemetry, onError, etc.) are properly cleaned up

@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Feb 2, 2026
@karthiknadig karthiknadig marked this pull request as ready for review February 2, 2026 17:28
@karthiknadig karthiknadig enabled auto-merge (squash) February 2, 2026 17:28
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 2, 2026
@karthiknadig karthiknadig merged commit 5a913e6 into main Feb 2, 2026
11 of 12 checks passed
@karthiknadig karthiknadig deleted the specific-felidae branch February 2, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NativePythonFinder: Resource leaks in dispose() - worker pool and disposables not cleaned up

2 participants

Comments