From 594d1512aad6bcc7060503a0e23cd2191bb6077d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 10 Dec 2017 13:17:17 +0100 Subject: [PATCH] Implemented destroy method for BaseSound class --- v3/src/sound/BaseSound.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/v3/src/sound/BaseSound.js b/v3/src/sound/BaseSound.js index 935158a9a..1f7c1b371 100644 --- a/v3/src/sound/BaseSound.js +++ b/v3/src/sound/BaseSound.js @@ -282,6 +282,18 @@ var BaseSound = new Class({ */ update: NOOP, destroy: function () { + this.manager.remove(this); // TODO replace with pendingRemove + this.manager = null; + this.key = ''; + this.isPlaying = false; + this.isPaused = false; + this.config = null; + this.currentConfig = null; + this.markers = null; + this.currentMarker = null; + this.fadeTween = null; + this.events.destroy(); + this.events = null; }, /** * @protected