Fix memory leak caused by listeners to nulToken (#84940)

This commit is contained in:
Alexandru Dima
2019-11-19 11:13:18 +01:00
parent 3e0dab8653
commit cf624b01fc

View File

@@ -5,6 +5,9 @@
import * as vscode from 'vscode';
const nulTokenSource = new vscode.CancellationTokenSource();
const noopDisposable = vscode.Disposable.from();
export const nulToken = nulTokenSource.token;
export const nulToken: vscode.CancellationToken = {
isCancellationRequested: false,
onCancellationRequested: () => noopDisposable
};