If I do this as below , after I click on the "TEST 1" button, it creates Audio Context thread but if I click it again it doesn't destroy the older Audio Context object rather creates another Audio Context (spawning another thread) on top of it.
After doing this multiple times, it fails because of the cap limit on the number of Audio Context that can be created simultaneously.
<h4> WEB AUDIO TEST </h4>
<canvas id='canvas' width='800px' height='500px'></canvas>
<button type="button" onclick="test()" width="200" height="300">TEST 1</button>
var testCtx = new webkitAudioContext();
var audioSource = testCtx.createBufferSource();