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
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0

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
};