MCPcopy Create free account
hub / github.com/microsoft/vscode-languageserver-node / cleanUp

Function cleanUp

client/src/client.ts:2698–2720  ·  view source on GitHub ↗
(restart: boolean = false)

Source from the content-addressed store, hash-verified

2696 }
2697
2698 private cleanUp(restart: boolean = false): void {
2699 if (this._listeners) {
2700 this._listeners.forEach(listener => listener.dispose());
2701 this._listeners = undefined;
2702 }
2703 if (this._providers) {
2704 this._providers.forEach(provider => provider.dispose());
2705 this._providers = undefined;
2706 }
2707 if (this._syncedDocuments) {
2708 this._syncedDocuments.clear();
2709 }
2710 for (let handler of this._dynamicFeatures.values()) {
2711 handler.dispose();
2712 }
2713 if (!restart && this._outputChannel && this._disposeOutputChannel) {
2714 this._outputChannel.dispose();
2715 }
2716 if (!restart && this._diagnostics) {
2717 this._diagnostics.dispose();
2718 this._diagnostics = undefined;
2719 }
2720 }
2721
2722 private notifyFileEvent(event: FileEvent): void {
2723 this._fileEvents.push(event);

Callers

nothing calls this directly

Calls 4

forEachMethod · 0.80
valuesMethod · 0.80
disposeMethod · 0.65
clearMethod · 0.65

Tested by

no test coverage detected