-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Closed
Description
vscode/src/vs/base/common/lifecycle.ts
Lines 130 to 131 in e9d8aaa
console.warn(new Error('Registering disposable on object that has already been disposed of').stack); | |
t.dispose(); |
🔝 That's quite mean because instead of throwing an error at the spot it disposes whatever has been given to it and therefore causes all kinds of errors later down the road. This issue is an example: #76769 of "random" carnage due to unexpected disposal and I was lucky to spot one occurrence of that warning. This fix was trivial, calling clear
instead of dispose
, an error that often happens during this refactoring.
So, either only warn and don't dispose or throw a real error.
Metadata
Metadata
Assignees
Labels
debtCode quality issuesCode quality issues