phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
http://scenerystack.org/
MIT License
9 stars 6 forks source link

Remove dispose code in Preferences #929

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

This doesn't not need to be disposed anymore since https://github.com/phetsims/phet-io/issues/1810

jessegreenberg commented 1 year ago

Disposal code under joist/js/preferences was removed. Only exception is a case involving the Voice combobox which needs to stay for its own implementation.

I tested by running local aqua for a bit for phet brand sims, phet-io brand sims, and sims that support interactive description. I also ran a few sims in the state wrapper which I think is where dispose was most important.

@zepumph would you like to spot check, anything else?

zepumph commented 1 year ago

Looks great. Thanks so much

zepumph commented 1 year ago

Oh, I got a couple more usages of sim-specific preferences taken care of. I also love all the assertions in dispose() calls in central Preferences. That will definitely help us ensure this behavior in the future.