title: Memory management & viewDidUnload?
body: <p>If I have a viewController setup as below:</p>
  
  <pre><code>@interface MapViewController : UIViewController &lt;MKMapViewDelegate, CLLocationManagerDelegate&gt; {
      CLLocationManager *locationManager;
  }
  
  -(void)viewDidLoad {
      [super viewDidLoad];
      locationManager = [[CLLocationManager alloc] init];
  }
  </code></pre>
  
  <p>when it comes to memory management should I be adding release to both viewDidUnload &amp; dealloc?</p>
  
  <pre><code>-(void)viewDidUnload {
      [locationManager release];
      locationManager = nil;
      [super viewDidUnload];
  }
  
  
  -(void)dealloc {
      [locationManager release];
      [super dealloc];
  }
  </code></pre>
  
  <p>cheers Gary</p>
  
  <p>EDIT:</p>
  
  <p>[super dealloc] moved to bottom as per Deans kind comment.</p>