phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

Memory Leak: AlphaParticle is not disposed because model.particleAnimations holds onto alphaParticleEmissionAnimation #186

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

After the finishEmitter, we should be able to clear this and dispose this animation fully so that it releases the AlphaParticle. We also probably want to try to release that animation too.

Ideas:

Add a listener to an Animation.finishEmitter so that when done, we remove it from particleAnimations. Make sure to handle other lists if needed though.

zepumph commented 1 year ago

Tagging #119

zepumph commented 1 year ago

From https://github.com/phetsims/build-a-nucleus/issues/165

zepumph commented 1 year ago

@Luisav1 can you give this a spot check and feel free to close.

Luisav1 commented 1 year ago

This is looking great, thanks. Closing.