diff options
author | Alex Ross <alros@microsoft.com> | 2022-11-10 20:05:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 20:05:39 +0300 |
commit | fc4a4ceee1e6f0c53c443958166d8d8cca795d61 (patch) | |
tree | 6a5ef23c324c25a0b51c2b6a30d431a2d1d77402 | |
parent | 624f4ac076f7ced1cbb52c65f281f0f00e4b1421 (diff) |
Fix leak in comments widget (#166016)
Fixes #165986
3 files changed, 3 insertions, 0 deletions
diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts index 8ca985d8f43..540457c3641 100644 --- a/src/vs/workbench/contrib/comments/browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -494,6 +494,7 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable { this.removeCommentEditor(); }, this.themeService); + this._register(this._commentFormActions); this._commentFormActions.setActions(menu); } diff --git a/src/vs/workbench/contrib/comments/browser/commentReply.ts b/src/vs/workbench/contrib/comments/browser/commentReply.ts index c085e3ccf0c..1f05642c792 100644 --- a/src/vs/workbench/contrib/comments/browser/commentReply.ts +++ b/src/vs/workbench/contrib/comments/browser/commentReply.ts @@ -261,6 +261,7 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable { this.hideReplyArea(); }, this.themeService); + this._register(this._commentFormActions); this._commentFormActions.setActions(menu); } diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index c011810f8f0..d7af5c13258 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -98,6 +98,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends this._scopedInstatiationService, this ) as unknown as CommentThreadBody<T>; + this._register(this._body); this._styleElement = dom.createStyleSheet(this.container); |