Skip to content

Commit

Permalink
Fix for Menu component memory leak (#6526)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
  • Loading branch information
aleksfront committed Nov 7, 2022
1 parent 19aeda0 commit 82ab60d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/renderer/components/menu/menu.tsx
Expand Up @@ -136,6 +136,8 @@ class NonInjectedMenu extends React.Component<MenuProps & Dependencies, State> {
window.removeEventListener("resize", this.onWindowResize);
window.removeEventListener("click", this.onClickOutside, true);
window.removeEventListener("scroll", this.onScrollOutside, true);
window.removeEventListener("blur", this.onBlur, true);
window.removeEventListener("contextmenu", this.onContextMenu, true);
}

componentDidUpdate(prevProps: MenuProps) {
Expand Down

0 comments on commit 82ab60d

Please sign in to comment.