When the user clicks the button, he introduces a new tab bar display controller with two view controllers. This is how i do it
ACLevelDownloadController *dvc = [[ACLevelDownloadController alloc] initWithNibName:@"ACLevelDownloadController" bundle:[NSBundle mainBundle]]; ACInstalledLevelsController *ivc = [[ACInstalledLevelsController alloc] initWithNibName:@"ACInstalledLevelsController" bundle:[NSBundle mainBundle]]; UITabBarController *control = [[UITabBarController alloc] init]; control.viewControllers = @[dvc, ivc]; dvc.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFeatured tag:0]; ivc.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:1]; [self presentViewController:control animated:YES completion:nil];
this works great. I reject this view controller using the dismiss method dismiss both ACLevelDownloadController and ACInstalledLevelsController . This also works great. What is strange is that memory usage increases when I present a controller of the form 
but he never returns. If I send it again, it will be even larger
I am using ARC. Why is the memory used by view controllers not freed after they are rejected?
EDIT
As they are rejected, both ACLevelDownloadController and ACInstalledLevelsController connected by IBActions that call this method when pressed
- (void)dismiss:(id)sender{ [self dismissViewControllerAnimated:YES completion:nil]; }
Chris loonam
source share