mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Clear parent on leak
This commit is contained in:
@@ -446,11 +446,17 @@ export class DisposableStore implements IDisposable {
|
||||
o.dispose();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the value from the store, but does not dispose it.
|
||||
*/
|
||||
public deleteAndLeak<T extends IDisposable>(o: T): void {
|
||||
if (!o) {
|
||||
return;
|
||||
}
|
||||
this._toDispose.delete(o);
|
||||
if (this._toDispose.has(o)) {
|
||||
this._toDispose.delete(o);
|
||||
setParentOfDisposable(o, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user