Most effective way of declaring variables for garbage collection
<p>What is the most efficient way of instanciating variables for performance and memory?</p>

<p>this : </p>

<pre><code>Context context = this;
Resources resources = context.getResources();
Drawable drawable = resources.getDrawable(R.drawable.image);
ListView list = (ListView) context.findViewById(R.id.list);
list.setBackgroundDrawable(drawable);
</code></pre>

<p>or this :</p>

<pre><code>((ListView) findViewById(R.id.list)).setBackgroundDrawable(getResources().getDrawable(R.drawable.image));
</code></pre>

<p>or it doesn't matter, it is does the same so I should stick with what I like the most?</p>
