Repository navigation
fix: memory leak in TerminalCodeExecutionProvider - #2
SimonSiefke wants to merge 1 commit into
Conversation
|
[ai-review] Review overview 🟡 Review feedback Findings: None. At Full validation remains incomplete: the supplemental baseline Run Selection scenario did not create its expected result file, leaving matched selection and latency checks unverified. Windows/full native Electron CI was not executed. The VS Code-core review/audit skills are absent from this extension repository, limiting certification of that adapted workflow. Validation and review detailsIndependent full static reviews: gpt-6-astra / max and gpt-6.1-sol / max; no introduced defect or test race found. Initial discussion contained no earlier feedback. Baseline/candidate native units: 157 / 159 passing. Root/API TypeScript checks, focused ESLint and formatting checks passed. The new close-lifetime test fails against baseline as expected. Native diagnostics also verified repeated active reuse, pending-start close/reopen, session disposal, and bounded listener/registry ownership. Both original real-UI smokes passed; matched measurements used VS Code 1.143.1, two warmups and 17 measured create/execute/close cycles per side. Candidate had zero filtered leak rows, and bounded raw-heap analysis confirmed both target deltas were zero. Accepted extension-host logs had no errors; source remained unchanged. Next checks: diagnose the supplemental baseline selection fixture, complete matched adjacent/performance acceptance, and run Windows/native integration coverage. Missing core-specific skills are a portability limitation, not a product defect. |
Details
TerminalCodeExecutionProvider adds a close listener each time a Python REPL starts. The listener and its subscription stay in the session disposal registry after the terminal closes.
Change
Dispose the close listener when its REPL closes, and keep one session cleanup handler for the active listener.
Before
When starting, running code in, and closing a Python REPL 17 times, its close callbacks in the extension host grow by 17:
After
No more leak detected.
Test Video
video.webm
AI disclosure: Model: GPT 6.1 Sol. Worktime: 12 min