We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovered during phetsims/reactants-products-and-leftovers#78.
TextPushButton is a subclass of RectangularPushButton that creates its own content:
options.content = new Text( text, combineOptions<TextOptions>( { font: options.font, fill: options.textFill, maxWidth: options.maxTextWidth, tandem: options.tandem.createTandem( 'text' ) }, options.textNodeOptions ) );
There are 2 memory leaks associated with options.content:
(1) It registers a tandem, added by @zepumph (2) It may be like to a TReadOnlyProperty<string>, added by @jonathanolson
TReadOnlyProperty<string>
So TextPushButton needs to override dispose and handle this.
dispose
The text was updated successfully, but these errors were encountered:
override dispose, #833
2a2a661
The tandem leak was introduced first, so assigning to @zepumph to review. Close if OK.
Sorry, something went wrong.
Yes very good. Thanks for the catch.
zepumph
No branches or pull requests
Discovered during phetsims/reactants-products-and-leftovers#78.
TextPushButton is a subclass of RectangularPushButton that creates its own content:
There are 2 memory leaks associated with options.content:
(1) It registers a tandem, added by @zepumph
(2) It may be like to a
TReadOnlyProperty<string>
, added by @jonathanolsonSo TextPushButton needs to override
dispose
and handle this.The text was updated successfully, but these errors were encountered: