Skip to content

Commit c8f684f

Browse files
authored
Fix comments memory leak (#213542)
Fixes #213535
1 parent 2f0b7c2 commit c8f684f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/vs/workbench/contrib/comments/browser/commentThreadHeader.ts

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export class CommentThreadHeader<T = IRange> extends Disposable {
6565
this._collapseAction = new Action('review.expand', nls.localize('label.collapse', "Collapse"), COLLAPSE_ACTION_CLASS, true, () => this._delegate.collapse());
6666

6767
const menu = this._commentMenus.getCommentThreadTitleActions(this._contextKeyService);
68+
this._register(menu);
6869
this.setActionBarActions(menu);
6970

7071
this._register(menu);

src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends
8888

8989
this._commentMenus = this.commentService.getCommentMenus(this._owner);
9090

91-
this._header = new CommentThreadHeader<T>(
91+
this._register(this._header = new CommentThreadHeader<T>(
9292
container,
9393
{
9494
collapse: this.collapse.bind(this)
@@ -98,7 +98,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends
9898
this._contextKeyService,
9999
this._scopedInstantiationService,
100100
contextMenuService
101-
);
101+
));
102102

103103
this._header.updateCommentThread(this._commentThread);
104104

0 commit comments

Comments
 (0)