Skip to content

Commit c9868d5

Browse files
Implemented destroy method for WebAudioSound class
1 parent 594d151 commit c9868d5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ var WebAudioSound = new Class({
163163
}
164164
},
165165
destroy: function () {
166+
BaseSound.prototype.destroy.call(this);
167+
this.audioBuffer = null;
168+
this.stopAndRemoveBufferSource();
169+
this.muteNode.disconnect();
170+
this.muteNode = null;
171+
this.volumeNode.disconnect();
172+
this.volumeNode = null;
173+
this.rateUpdates = null;
166174
},
167175
/**
168176
* @private

0 commit comments

Comments
 (0)