Hello,
I use a combination of a tabBar and a navigationcontroller based on
this example. Testing my app in the Leaks-tool, it indicates a leak in my appDelegate after that where I have defined my 4 navigation controllers. I have marked the content red where the leak is supposed to be. My problem is that I do not know why my app is leaking here? Any ideas? What should I be seaching for? It leaks 128 Bytes if that may be some indication here...
Thanks in advance!
MACloop
I use a combination of a tabBar and a navigationcontroller based on
this example. Testing my app in the Leaks-tool, it indicates a leak in my appDelegate after that where I have defined my 4 navigation controllers. I have marked the content red where the leak is supposed to be. My problem is that I do not know why my app is leaking here? Any ideas? What should I be seaching for? It leaks 128 Bytes if that may be some indication here...
Thanks in advance!
MACloop
Code:
...
[COLOR="DarkGreen"]//code like this is added 4 times[/COLOR]
TableViewController *tableViewController;
tableViewController = [[TableViewController alloc] initWithNibName:@"tableViewController" bundle:nil];
localNavigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController];
localNavigationController.navigationBar.tintColor = [UIColor lightGrayColor];
[localNavigationController.tabBarItem initWithTitle:@"Table" image:[UIImage imageNamed:@"some_pic.png"] tag:4];
[localControllersArray addObject:localNavigationController];
[COLOR="Red"][localNavigationController release];
[tableViewController release];
...
[COLOR="DarkGreen"]//the tabBarController is retained in the .h file and is released in the dealloc method[/COLOR]
tabBarController.viewControllers = localControllersArray;
[COLOR="Red"][localControllersArray release];[/COLOR]
[window addSubview:tabBarController.view];