jQuery: keeping references to jQuery object during application runtime
<p>I've got a question about treating references to jQuery objects.</p>

<p>Let suppose in my app I have a DOM element DIV with ID=some_widget, it is supposed to live during all the application runtime and be used quite often in the code.</p>

<p>1) So if I keep a reference to it in a global var during application runtime:</p>

<pre><code>var someWidget = $("#some_widget") 
</code></pre>

<p>it will create jquery objects once, but will consume memory during application run, but when I use someWidget it wont create jquery object again, so this can speed up the process.</p>

<p>2) if I will alway use the call of $("#some_widget") in the code, it won't consume memory constantly, but every time I use $. it will take time jQuery to construct the object.</p>

<p>Am I right? What approach is more sufficient?
Can keeping the references to many object end up with memory leak?
what does it depend on, what do you think?</p>
