Does setInterval leak?
<p>i'm doing some javascript, where I repeadetly click a button, using </p>

<pre><code>setInterval(function(){
    clickmyButton()
}, 500);
</code></pre>

<p>Eventually clickmyButton will send the user to another page (via window.location.href="Other page"). I was wondering, since I never called clearInterval within the function will it cause a leak? I just assumed that since the page goes to another page, the javascript on the old page will stop running and be cleaned up.</p>
