title: UIImage imageNamed memory leak
body: <p>I am trying to understand why I have memory leaks in a very basic implementation of a UIImage and a UIImageView.</p>
  
  <p>I am not using ARC in that case (correctly disabled).</p>
  
  <p>My code is pretty straightforward :</p>
  
  <pre><code>UIImage *image = [UIImage imageNamed:@"my_image.jpg"];
  UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
  [[self view] addSubview:imageView];
  [imageView release];
  </code></pre>
  
  <p>I am implementing this code in the <code>viewDidLoad:</code> method of a UIViewController.</p>
  
  <p>By calling the method <code>imageNamed:</code> of UIImage, I know that I will get an object that I do not own / an autorelease object. This object will also be retained by the UIImageView object instantiated just after. So the only object I have the ownership is the UIImageView one.</p>
  
  <p>After running this app with the Memory Leaks Instruments, I have this report :</p>
  
  <p><img src="https://i.stack.imgur.com/9tf3t.png" alt="enter image description here"></p>
  
  <p>I heard about the cache system that operates but I should not have have memory leaks because some datas are cached.</p>
  
  <p>Here is a reference to the answer with the cache explanation :
  <a href="https://stackoverflow.com/a/2930567/1154501">https://stackoverflow.com/a/2930567/1154501</a></p>
  
  <p>Thank you in advance !</p>
  
  <p>Edit : Tried also with ARC, and I got the same issue.</p>