From 14f8c44ad9c6af52cfd8a2cb21d275617166fca3 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Fri, 15 Jun 2018 12:54:44 -0400 Subject: [PATCH] Stop all sounds by clones when disposed --- src/sprites/rendered-target.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 293666acf..93e7d8c7f 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -1130,6 +1130,9 @@ class RenderedTarget extends Target { dispose () { this.runtime.changeCloneCounter(-1); this.runtime.stopForTarget(this); + if (this.sprite.soundBank) { + this.sprite.soundBank.stopAllSounds(this); + } this.sprite.removeClone(this); if (this.renderer && this.drawableID !== null) { this.renderer.destroyDrawable(this.drawableID, this.isStage ?