requirejs reload javascript file
<p>I write a single web app using requirejs, i have no idea if reload js file frequently, the previous file that object has created can remove by browser or must close the page?</p>

<p>main.js</p>

<pre><code>btn.click(function() {
    require('./test.js?_r=' + Math.random());
});
</code></pre>

<p>test.js</p>

<pre><code>var a = [];
for(var i = 0; i &lt; 1000000; i++) {
   a.push('myname ' + i);
}
</code></pre>