From cd9a7e59f40d6ad04741c2cd63090fa4343f34d5 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Thu, 17 Nov 2022 16:46:02 -0700 Subject: [PATCH] comment out createKeyboardHelpNode in all screens, to prevent PhET-iO memory leak, https://github.com/phetsims/ph-scale/issues/249 --- js/macro/MacroScreen.ts | 6 +++--- js/micro/MicroScreen.ts | 6 +++--- js/mysolution/MySolutionScreen.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/macro/MacroScreen.ts b/js/macro/MacroScreen.ts index d09248d3..a883fd77 100644 --- a/js/macro/MacroScreen.ts +++ b/js/macro/MacroScreen.ts @@ -20,7 +20,6 @@ import phScale from '../phScale.js'; import PhScaleStrings from '../PhScaleStrings.js'; import MacroModel from './model/MacroModel.js'; import MacroScreenView from './view/MacroScreenView.js'; -import MacroKeyboardHelpContent from './view/MacroKeyboardHelpContent.js'; type SelfOptions = EmptySelfOptions; @@ -42,8 +41,9 @@ export default class MacroScreen extends Screen { navigationBarIcon: new ScreenIcon( new Image( macroNavbarIcon_png ), { maxIconWidthProportion: 1, maxIconHeightProportion: 1 - } ), - createKeyboardHelpNode: () => new MacroKeyboardHelpContent() + } ) + //TODO https://github.com/phetsims/ph-scale/issues/249 restore when work on alternative input resume + // createKeyboardHelpNode: () => new MacroKeyboardHelpContent() }, providedOptions ); super( diff --git a/js/micro/MicroScreen.ts b/js/micro/MicroScreen.ts index bce6b000..fec707c0 100644 --- a/js/micro/MicroScreen.ts +++ b/js/micro/MicroScreen.ts @@ -20,7 +20,6 @@ import PhScaleStrings from '../PhScaleStrings.js'; import MicroModel from './model/MicroModel.js'; import MicroScreenView from './view/MicroScreenView.js'; import PickRequired from '../../../phet-core/js/types/PickRequired.js'; -import MicroKeyboardHelpContent from './view/MicroKeyboardHelpContent.js'; type SelfOptions = EmptySelfOptions; @@ -42,8 +41,9 @@ class MicroScreen extends Screen { navigationBarIcon: new ScreenIcon( new Image( microNavbarIcon_png ), { maxIconWidthProportion: 1, maxIconHeightProportion: 1 - } ), - createKeyboardHelpNode: () => new MicroKeyboardHelpContent() + } ) + //TODO https://github.com/phetsims/ph-scale/issues/249 restore when work on alternative input resume + // createKeyboardHelpNode: () => new MicroKeyboardHelpContent() }, providedOptions ); super( diff --git a/js/mysolution/MySolutionScreen.ts b/js/mysolution/MySolutionScreen.ts index d3896cab..19a34c15 100644 --- a/js/mysolution/MySolutionScreen.ts +++ b/js/mysolution/MySolutionScreen.ts @@ -19,7 +19,6 @@ import PHScaleColors from '../common/PHScaleColors.js'; import phScale from '../phScale.js'; import PhScaleStrings from '../PhScaleStrings.js'; import MySolutionModel from './model/MySolutionModel.js'; -import MySolutionKeyboardHelpContent from './view/MySolutionKeyboardHelpContent.js'; import MySolutionScreenView from './view/MySolutionScreenView.js'; type SelfOptions = EmptySelfOptions; @@ -42,8 +41,9 @@ export default class MySolutionScreen extends Screen new MySolutionKeyboardHelpContent() + } ) + //TODO https://github.com/phetsims/ph-scale/issues/249 restore when work on alternative input resume + // createKeyboardHelpNode: () => new MySolutionKeyboardHelpContent() }, providedOptions ); super(