Use .close()
instead of the private .destroy()
to stop leaking WebContents (#2990)
* Use `.close()` instead of the private `.destroy()` to stop leaking WebContents * Fix tests
This commit is contained in:
@@ -354,11 +354,7 @@ export class ViewManager {
|
||||
log.error('Failed to remove URL view', e);
|
||||
}
|
||||
|
||||
// workaround to eliminate zombie processes
|
||||
// https://github.com/mattermost/desktop/pull/1519
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
urlView.webContents.destroy();
|
||||
urlView.webContents.close();
|
||||
};
|
||||
|
||||
const adjustWidth = (event: IpcMainEvent, width: number) => {
|
||||
|
Reference in New Issue
Block a user