Skip to content

Commit

Permalink
Fix comments memory leak
Browse files Browse the repository at this point in the history
Fixes #213535
  • Loading branch information
alexr00 committed May 27, 2024
1 parent 09e9d30 commit 9075f4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class CommentThreadHeader<T = IRange> extends Disposable {
this._collapseAction = new Action('review.expand', nls.localize('label.collapse', "Collapse"), COLLAPSE_ACTION_CLASS, true, () => this._delegate.collapse());

const menu = this._commentMenus.getCommentThreadTitleActions(this._contextKeyService);
this._register(menu);
this.setActionBarActions(menu);

this._register(menu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends

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

this._header = new CommentThreadHeader<T>(
this._register(this._header = new CommentThreadHeader<T>(
container,
{
collapse: this.collapse.bind(this)
Expand All @@ -98,7 +98,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends
this._contextKeyService,
this._scopedInstantiationService,
contextMenuService
);
));

this._header.updateCommentThread(this._commentThread);

Expand Down

0 comments on commit 9075f4c

Please sign in to comment.