I'm using wavesurfer on an angular project, with a directive similar to the one in this fiddle:
http://jsfiddle.net/4zqdtL2b/
When the directive is destroyed, it calls the wavesurfer destroy function along with it. However in Chrome, clicking fill and clear multiple times shows that the memory just keeps going up instead of being cleared.
Duplicate of #374, #320 and #77.
Can you describe your memory profiling method?
I watch the tab in chrome://memory-internals/
@Rhathe for chrome and firefox we implemented the webaudio close method in the latest version to clear the memory on detroy function.

Any further updates on this?
Seems memory is not GC'd properly for all use cases / browsers?
@gitdisrupt This is an ongoing effort. Considering all plugins involved there is a lot of code to check and profile. Help is greatly appreciated! You might also try the new v2 beta release if that is any better.
Thanks for the response!
Currently i am working to test using another lib to decode and create peaks ... once i have that working ill test wavesurfer using mediaElement setting with peak data pre-generated to see what kind of improvement i can achieve...
When you say beta ... you mean v1.4.0 ? - im not seeing v2 beta in releases
UPDATE: so i am now generating peak data server side and instantiating wavesurfer via mediaElement and not WebAudio ...
Sadly, i am not seeing much of a difference. I have also tried playback with and without the waveform display / render all together ...
... memory appears to increase during playback, and it is that memory that is never released ... so Im going to try to look deeper into the canvas, draw methods and animation to see if i can track down any leaks there.
I think i tracked down the memory leaks, i am just not sure how to fix as i am not familiar enough with wavesurfer nor canvas animation. I opened a new issue: https://github.com/katspaugh/wavesurfer.js/issues/1084
I use Web Audio API test to find out:The memory leak is caused by AudioContext.decodeAudioData,But I do not know how to solve this problem.Who has any way to solve this memory problem, thank you very much。
@huhhw can you show us how you arrived at the conclusion that AudioContext.decodeAudioData is the cause of the memory leak?
no feedback, closing (can't reproduce)