MCPcopy Index your code
hub / github.com/PowerShell/vscode-powershell / dispose

Method dispose

src/process.ts:214–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 }
213
214 public dispose(): void {
215 this.logger.writeDebug(
216 `Disposing PowerShell process with PID: ${this.pid}`,
217 );
218
219 void this.deleteSessionFile(this.sessionFilePath);
220
221 this.onExitedEmitter?.fire();
222 this.onExitedEmitter = undefined;
223
224 this.consoleTerminal?.dispose();
225 this.consoleTerminal = undefined;
226
227 this.consoleCloseSubscription?.dispose();
228 this.consoleCloseSubscription = undefined;
229
230 this.pidUpdateEmitter?.dispose();
231 this.pidUpdateEmitter = undefined;
232 }
233
234 public sendKeyPress(): void {
235 // NOTE: This is a regular character instead of something like \0

Callers 2

onTerminalCloseMethod · 0.95
cleanUpTerminalsMethod · 0.45

Calls 2

deleteSessionFileMethod · 0.95
writeDebugMethod · 0.65

Tested by

no test coverage detected