Skip to content

Commit 2884984

Browse files
authored
Fix microsoft#189013. Dispose cell toolbar properly to avoid memory leak. (microsoft#189014)
1 parent d1621ba commit 2884984

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ export class CellTitleToolbarPart extends CellOverlayPart {
166166
return this._view;
167167
}
168168

169-
const toolbar = this.instantiationService.createInstance(WorkbenchToolBar, this.toolbarContainer, {
169+
const toolbar = this._register(this.instantiationService.createInstance(WorkbenchToolBar, this.toolbarContainer, {
170170
actionViewItemProvider: action => {
171171
return createActionViewItem(this.instantiationService, action);
172172
},
173173
renderDropdownAsChildElement: true
174-
});
174+
}));
175175

176176
const deleteToolbar = this._register(this.instantiationService.invokeFunction(accessor => createDeleteToolbar(accessor, this.toolbarContainer, 'cell-delete-toolbar')));
177177
if (model.deleteActions.primary.length !== 0 || model.deleteActions.secondary.length !== 0) {

0 commit comments

Comments
 (0)