Skip to content

Commit bf32e95

Browse files
committed
More disposable stuff
1 parent 75fc451 commit bf32e95

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/client/repl/nativeRepl.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ export class NativeRepl implements Disposable {
5555
nativeRepl.interpreter = interpreter;
5656
await nativeRepl.setReplDirectory();
5757
nativeRepl.pythonServer = createPythonServer([interpreter.path as string], nativeRepl.cwd);
58+
nativeRepl.disposables.push(nativeRepl.pythonServer);
5859
nativeRepl.setReplController();
5960
nativeRepl.registerInterpreterChangeHandler();
6061

6162
return nativeRepl;
6263
}
6364

6465
dispose(): void {
66+
if (this.pendingInterpreterChangeTimer) {
67+
clearTimeout(this.pendingInterpreterChangeTimer);
68+
}
6569
this.disposables.forEach((d) => d.dispose());
6670
}
6771

@@ -165,6 +169,7 @@ export class NativeRepl implements Disposable {
165169
this.interpreter = interpreter;
166170
this.pythonServer.dispose();
167171
this.pythonServer = createPythonServer([interpreter.path as string], this.cwd);
172+
this.disposables.push(this.pythonServer);
168173
if (this.replController) {
169174
this.replController.dispose();
170175
}

0 commit comments

Comments
 (0)