Chrome: Memory leak when continously loading and unloading a sound
In my application, I dynamically load and unload sound resources to avoid flooding the memory and crashing the browser. However, every time a Howl is loaded and unloaded, a little bit of memory is not released properly.
The following code, using any Howl group, causes the issue.
for (let i = 0; i < 50; i++) {
const promise = new Promise((resolve, reject) => {
group.on('load', () => resolve());
});
group.load();
await promise;
group.unload();
}
If you check the memory footprint of the tab after running this code and collecting garbage, you will notice that the memory usage rises by a small amount.
Is there a specific way the Howls need to be unloaded, for them to release all resources?
Having the exact same issue in IOS WKWebView. Also dynamically loading and unloading sounds to try to keep memory usage down. Has anyone found a work around?
Bump. Same on every device.
Web Audio causes huge memory leaks in Howler. But there is no memory leak if html5 audio is set to true.
Do not use Web Audio in Howler and everything will be fine. This unlikely to be fixed.