I am creating a new UIViewController with the below code
GameViewController *temp = [[GameViewController alloc] initWithNibName:@"GameViewController" bundle:nil];
NSLog(@"retain count%d", [temp retainCount]);
temp.backgroundMusic = backgroundMusic;
self.gameView = temp;
[temp release];
[self presentModalViewController:gameView animated:YES];
[gameView release];
but when I look at retain counts, my temp view controller returns 4.
How this is possible?? Because it is 4, when I dismiss the view controller I cant remove it from memory and my game is going on playing. (I can see the effects of AI playing).