title: Instruments show memory leak - Xcode 5 / iOS7
body: <p>I have the following piece of code:</p>
  
  <pre><code>NSString *bgImageName = [[Useful instance] getRootviewBackgroundImageName];
  UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:bgImageName]];
  imageView.clipsToBounds = YES;
  CGRect rc = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
  [imageView setFrame:rc];
  [self.view insertSubview:imageView atIndex:0];
  [imageView release];
  </code></pre>
  
  <p>Instruments shows 100% and a memory leak at line two in the above code, which was not the case in xcode 4.6. I am working now with xCode 5 on osx 10.8.5</p>
  
  <p>It seems, that i properly release the allocated <code>UIImageView</code> (line 7) which gets inserted in my view at line 6, so i can't see why intruments is bringing up a memory leak warning.</p>
  
  <p>Does anybody know why instuments brings up that (in my opinion) wrong information?</p>
  
  <p>EDIT: here's the instruments-screenshot with the allocation-summary of my leaked object:</p>
  
  <p><img src="https://i.stack.imgur.com/J28xI.png" alt="Instruments - Allocations"></p>
  
  <p>The <code>UIKit</code> and QuartzCore are retaining my object, which is the reason for my leaking <code>UIImageView</code> (or am I wrong with this assumption?).</p>
  
  <p>The <code>UIImageView</code> is inserted to the view (a <code>UIViewController</code>), which is referenced in my xib-file. How can control what happens with my added <code>UIImageView</code> after adding it to 'self.view'?</p>