Once you've loaded a mp3 into a sound object via createjs, how dow you destroy & clear it from memory?
Asked
Active
Viewed 563 times
1 Answers
1
There are static methods for this:
removeSound
: Remove stored references to sounds by sourceremoveSounds
: Remove multiple sound src'sremoveAllSounds
: Wipe references to sounds
Examples
createjs.Sound.removeSound("myID");
createjs.Sound.removeSound("myAudioBasePath/mySound.ogg");
createjs.Sound.removeSound("myPath/myOtherSound.mp3", "myBasePath/");
createjs.Sound.removeSound({mp3:"musicNoExtension", ogg:"music.ogg"}, "myBasePath/");
Check out the docs for more info.
This is not a super common use-case, so if you run into issue, please feel free to open an issue on GitHub

Lanny
- 11,244
- 1
- 22
- 30
-
ooo, Nice! Thanks Lanny, I'll give this a shot. – tolmark Jan 23 '16 at 00:14