mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +08:00
fix(editor): memory leak caused by missing unsubscription from autoUpdate (#13205)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved resource cleanup for floating UI elements and popups to prevent potential memory leaks and ensure proper disposal when components are removed or updated. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -85,6 +85,8 @@ export class MenuSubMenu extends MenuFocusable {
|
||||
.catch(err => console.error(err));
|
||||
});
|
||||
this.menu.openSubMenu(menu);
|
||||
// in case that the menu is not closed, but the component is removed,
|
||||
this.disposables.add(unsub);
|
||||
}
|
||||
|
||||
protected override render(): unknown {
|
||||
|
||||
Reference in New Issue
Block a user