I try to loop on a sample by adding a onended event to it (once). The problem is : when run in a browser, the JS event listeners count increment on each loop. It seems that something can't be garbage collected but I can't figure out what.
Here's a minimal example that reproduces the issue (I try to avoid references to global vars in the play function, without success):
Hi,
I try to loop on a sample by adding a
onended
event to it (once). The problem is : when run in a browser, theJS event listeners
count increment on each loop. It seems that something can't be garbage collected but I can't figure out what.Here's a minimal example that reproduces the issue (I try to avoid references to global vars in the
play
function, without success):