Skip to content

Commit dbf339a

Browse files
committed
Fixed dispose()
1 parent b098656 commit dbf339a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/extension.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ export class ClassCompletionItemProvider implements CompletionItemProvider, Disp
3030
readonly findLinkHref = /href\s*=\s*(["'])((?:(?!\1).)+)\1/si;
3131

3232
dispose() {
33-
this.disposables.forEach(e => e.dispose());
33+
let e;
34+
35+
while (e = this.disposables.pop()) {
36+
e.dispose();
37+
}
38+
39+
this.cache.clear();
3440
}
3541

3642
getStyleSheets(uri: Uri): string[] {

0 commit comments

Comments
 (0)