Dispose thread earlier

Part of #148216
This commit is contained in:
Alex Ross
2022-04-27 15:58:34 +02:00
parent d5a33a82b8
commit 85ea9c5f65

View File

@@ -300,6 +300,7 @@ export class MainThreadCommentController {
deleteCommentThread(commentThreadHandle: number) {
let thread = this.getKnownThread(commentThreadHandle);
this._threads.delete(commentThreadHandle);
thread.dispose();
if (thread.isDocumentCommentThread()) {
this._commentService.updateComments(this._uniqueId, {
@@ -314,8 +315,6 @@ export class MainThreadCommentController {
changed: []
});
}
thread.dispose();
}
deleteCommentThreadMain(commentThreadId: string) {