Running Instruments on my iPad app found 2 leaks, except I cannot understand where they are coming from. The first one is in this method in my app delegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:self.viewController.view]; // <--- it leaks on this line
[window makeKeyAndVisible];
return YES;
}
I don't know why this is leaking, I am releasing viewController
in dealloc
. The second leak is in one of my table view controllers in this section of code:
EditLocationViewController *locationController = [[EditLocationViewController alloc] initWithLocation:self.location];
[self.navigationController pushViewController:locationController animated:YES]; // <--- it leaks on this line
[locationController release];
I went through my EditLocationViewController
class and made sure that all retained properties are being released, etc. so I can't see a reason why it would leak.
Either I'm missing something here or Instruments is reporting false positives.