Creating multiple waveforms and memory leaking
See original GitHub issueHi, I have a question
I am creating multiple waveforms and it works well by creating one instance and using MediaElement (thanks for people who helped it out #1005)
But I found that there’s memory leaking
Got this from Chrome Timeline and apparently it happens when it calls XHRhttpRequest
And this from Chrome profile
here’s the code from wavesurfer.js
ajax: function (options) {
...
var xhr = new XMLHttpRequest();
xhr.open(options.method || 'GET', options.url, true);
xhr.responseType = options.responseType || 'json';
...
}
what I don’t understand is this ajax function calls an audio file (ex. http://localhost/audio/sample.mp3) and my understanding of ajax call is usually some code file.
So my question is
- why ajax function calls an audio file.
- the way how to prevent memory leaking or to free used memory
Browser version(s):
Chrome Version 56.0.2924.87 (64-bit)
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Huge memory leak related to Waveform Chart - NI Community
Everything got better but memory still keeps rising to 1500 MB. It seems to be caused by the Waveform Graph property nodes or...
Read more >Memory leak from waveform plotting at high frequency
The problem is that you are using 'f' as a loop index. That won't work here, because it starts the array at 200000000,...
Read more >Memory leak using multiple boost::connect on single slot_type
I'm using boost::signals and leaking memory when I try to connect multiple signals to a single slot_type . I've seen this same leak...
Read more >Memory leak in C++ and How to avoid it? - GeeksforGeeks
Memory leakage occurs in C++ when programmers allocates memory by using new keyword and forgets to deallocate the memory by using delete() ...
Read more >M1 Mac Waveforms Memory leak beachball - Digilent Forum
No variation of settings on scope trace run escapes this memory leak. The memory leak is only solved by quit/restart of waveforms.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
XMLHttpRequest
) can be used to fetch all kinds of files. Wavesurfer loads audio with Ajax if 1. Backend Web Audio is used or 2. Peaks are not providedthis.arraybuffer
not being nullified indestroy
.Hi @DOOGIE-CHOE ,
Thanks for the note and I tried this and still got this issue. Some of my findings,
WebAudio
as backend but I have no other choice as my application requires the user to navigate back and forth to analyze the audio.Most of the issues are part of #1940 , So hopefully we get this resolved 🙂 and thanks again for your quick response