title: Memory management of many UIImageViews
body: <p>I'm making an iOS app in which, if memory were not an issue, there would be thousands of images loaded on the screen simultaneously. Obviously, this is not a good approach, so what I want to do is "unrender" some of these images so that only a few are on screen at any given point, and then "rerender" them when the user takes certain actions. So my question is, how could I do this?</p>
  
  <p>Or, if it's any easier, all of the images are the same; I know this may sound kind of weird, but yes my app could require thousands of the same image to be loaded on screen. Since this is the case, is memory management not really an issue since they'll all be referencing the same file? (and by not an issue, I mean such that I can just use the <code>hidden</code> property to change what is and is not on screen). If I can do this, I was doing</p>
  
  <pre><code>UIImage *image = [[UIImage alloc] initWithContentsOfFile:@"image.png"];
  UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
  [scrollView addSubview:imageView];
  </code></pre>
  
  <p>(scrollView is a <code>UIScrollView</code> that I was using to give pinch to zoom functionality to the <code>UIImageView</code>). The issue, though, is that when I do this the <code>UIImageView</code> isn't rendered at all.</p>
  
  <p>Any other ideas or suggestions are of course appreciated, and thanks in advance :D</p>