Skip to content

Commit

Permalink
fix(edgeless): memory leak in edgeless widgets (#8862)
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlewind authored Dec 5, 2024
1 parent ff41d91 commit 4f02d3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ export class EdgelessFrameOrderMenu extends WithDisposable(LitElement) {
});
}

override disconnectedCallback(): void {
super.disconnectedCallback();
this._disposables.dispose();
}

override firstUpdated() {
this._bindEvent();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export class EdgelessNavigatorSettingButton extends WithDisposable(LitElement) {
this._tryRestoreSettings();
}

override disconnectedCallback(): void {
this._navigatorSettingPopper?.dispose();
this._navigatorSettingPopper = null;
}

override firstUpdated() {
this._navigatorSettingPopper = createButtonPopper(
this._navigatorSettingButton,
Expand Down

0 comments on commit 4f02d3a

Please sign in to comment.