Closed pixelzoom closed 4 years ago
Equation does not currently need dispose
. It links to Properties of its reactants and products:
this.reactants.forEach( reactant => reactant.userCoefficientProperty.lazyLink( observer ) );
this.products.forEach( product => product.userCoefficientProperty.lazyLink( observer ) );
... but Equation is an abstract base class, and the reactants and products are own owned by the subclasses. So there is no need to call dispose for any instance of Equation.
It will likely need dispose
if/when instrumented for PhET-iO.
I detected a TODO for this issue as part of https://github.com/phetsims/chipper/issues/946 and decided to remove the TODO.
Game creates 5 of these when level selection button is pressed.