Fix memory leak caused by listeners to nulToken (#84940)
This commit is contained in:
parent
3e0dab8653
commit
cf624b01fc
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue