phetsims / unit-rates

"Unit Rates" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 2 forks source link

delete unnecessary dispose code #177

Closed pixelzoom closed 7 years ago

pixelzoom commented 7 years ago

Decided to do this while going over code review with @Denz1994.

The only necessary dispose code is in the view for Shopping and Shopping Lab screens. Everything else (model and view) exists for the lifetime of the sim. So the only places that we should find dispose: are in:

js/common/view/
js/shopping/view/
js/shippinglab/view/

We noticed that there are some dispose functions implemented in the model and the Racing Lab screen. Since that code is unused (and therefore untested), it would be better to delete it, and document why dispose is unnecessary in these cases.

pixelzoom commented 7 years ago

https://github.com/phetsims/unit-rates/issues/159

pixelzoom commented 7 years ago

Done, closing.