iphone - classes, objects and memory consumption
<p>Suppose I have an application that will draw 20 little UIImageViews on the screen. Suppose 20 playing cards faced down. So, you have the same image 20 times on the screen.</p>

<p>Suppose I have two cases:</p>

<h2><strong>CASE 1</strong></h2>

<p>I have a method not on a class that loads the card back texture, applies to a UIImageView and positions it on the screen. This method is run 20 times, so all cards are put on screen as image views.</p>

<h2><strong>CASE 2</strong></h2>

<p>I have a class that once initialized will load the card background image, apply to a UIImageView and deliver it as an object.</p>

<p>Suppose that now I want to animate the 20 cards, using simple UIImageView translation.</p>

<p>Looking by the point of view of memory consumption, CPU load and run time execution which of the two cases I mentioned will be lighter for the application and consume less memory?</p>

<p>thanks.</p>
