-(IBAction)customizeYourGameButtonClicked:(id)sender {
[self playHumanHitSound];
self.customizeYourGameViewController = [[CustomizeYourGameViewController alloc]
initWithNibName:@"CustomizeYourGameViewController" bundle:nil];
[self.navigationController
pushViewController:customizeYourGameViewController animated:YES];
[customizeYourGameViewController release];
}
Can’t understand why this is leaking. I set customizeYourGameViewController as a property and synthesized it.
It looks like
customizeYourGameViewControlleris a property on your class. Is it set to retain? If so, the @synthesized setter for customizeYourGameViewController is doing a retain and you’ll need to release somewhere.Although, thinking about this, I’m wondering: Why is
customizeYourGameViewControllera property? Unless you’re communicating with the controller elsewhere, it should just be a local variable.Then remove the ivar and remove the property.