Skip to content

Commit

Permalink
Fixing memory leak, see phetsims/my-solar-system#88
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Mar 4, 2023
1 parent e12c7d0 commit 8f891c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/view/BodyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ export default class BodyNode extends ShadedSphereNode {
this.stopSound();
if ( options.soundViewNode ) {
soundManager.removeSoundGenerator( this.soundClip );
soundManager.removeSoundGenerator( this.grabClip );
soundManager.removeSoundGenerator( this.releaseClip );
}
this.soundClip.dispose();
};
Expand Down

0 comments on commit 8f891c2

Please sign in to comment.