AudioContext.close() will release the hardware of the context, but check that it is available only for recent versions of chrome and firefox. Not available for IE aparently.
Check the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/close