Skip to content

Commit

Permalink
dispose Properties of FocusManager, see #1602
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Feb 14, 2024
1 parent 827b168 commit bf56506
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/accessibility/FocusManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export default class FocusManager {
private static globallyAttached = false;

public constructor() {
// TODO: why aren't these disposed? https://github.com/phetsims/scenery/issues/1602
this.pointerFocusProperty = new Property( null );
this.readingBlockFocusProperty = new Property( null );
this.lockedPointerFocusProperty = new Property( null );
Expand Down Expand Up @@ -172,6 +171,12 @@ export default class FocusManager {
}

public dispose(): void {
this.pointerFocusProperty.dispose();
this.readingBlockFocusProperty.dispose();
this.lockedPointerFocusProperty.dispose();
this.pdomFocusHighlightsVisibleProperty.dispose();
this.interactiveHighlightsVisibleProperty.dispose();
this.readingBlockHighlightsVisibleProperty.dispose();
this.readingBlockFocusController.dispose();
this.pointerFocusDisplayedController.dispose();
this.pointerHighlightsVisibleProperty.dispose();
Expand Down

0 comments on commit bf56506

Please sign in to comment.