Explicitly close webContents on removal

This commit is contained in:
Max Goodhart
2025-06-15 03:09:07 +00:00
parent 189e19ab2b
commit eae539c4e3

View File

@@ -279,6 +279,7 @@ export default class StreamWindow extends EventEmitter<StreamWindowEventMap> {
for (const view of unusedViews) { for (const view of unusedViews) {
const contentView = view.getSnapshot().context.view const contentView = view.getSnapshot().context.view
win.contentView.removeChildView(contentView) win.contentView.removeChildView(contentView)
contentView.webContents.close()
} }
this.views = newViews this.views = newViews
this.emitState() this.emitState()