Skip to content

Commit

Permalink
Fix memory leak caused by listeners to nulToken (#84940)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Nov 19, 2019
1 parent 3e0dab8 commit cf624b0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

0 comments on commit cf624b0

Please sign in to comment.