title: IOS allocated objects is not referenced later in this execution path retain count +1
body: <p>In my appDelegate.h file I do this:</p>
  
  <pre><code>CLLocationManager       *locationManager;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@property (nonatomic, retain) CLLocationManager *locationManager;
  </code></pre>
  
  <p>Then later in the .m file:</p>
  
  <pre><code>...
  
  @synthesize locationManager;
  ...
  if ([CLLocationManager locationServicesEnabled])
  {
  
      [myGizmoClass setLocationManagerDisabled:FALSE];
  
      self.locationManager = [[CLLocationManager alloc] init];
  
      self.locationManager.delegate = self;
  
      [self.locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
  
      [self.locationManager setDistanceFilter:kCLDistanceFilterNone];
  
  
      [self.locationManager startUpdatingLocation];
  
  ...
  </code></pre>
  
  <p>Yet I am getting the following in XCode 4.5 (see image attached)</p>
  
  <p><img src="https://i.stack.imgur.com/tHi5j.png" alt="Object leaked: allocated object is not referenced later in this code execution path"></p>
  
  <p>(Object leaked: allocated object is not referenced later in this code execution path)</p>
  
  <p>What the heck?  I reference it right after that line.</p>
  
  <p>I am not seeing the issue. PS: No crash, or anything. Let me be clear. This <strong>is</strong> working as it is.  I just hate the error. I am QUITE sure that I am missing something silly.  Can anyone help?</p>
  
  <p><em>Please do not post anything with regards to "You don't have to do @property anymore", etc. This code was written back for xcode 3.5-4~ish and I prefer being specific because I hate having to flip back and forth between the shorthand that XCode 4.5 allows and what older projects require (and still have in their source code). So I still use the full definitions in the .h file.  I figured that the major change to programming style would come with the next major update of the app.  (thanks for understanding)</em></p>