I have a BaseViewController, which is a subclass of UITabBarController, and set up my views in this view controller.

```
-(void)setUpViews
{
FirstController *mainViewController = [[FirstController alloc] initAssignment:delegate.currentAssignment withMutableArray:myArray];
UINavigationController *firstNavController = [[UINavigationController alloc] initWithRootViewController:mainViewController];

SecondController *secondViewController = [[SecondController alloc] initWithNibName:@"SecondController" bundle:nil];
UINavigationController *secondNavController = [[UINavigationController alloc] initWithRootViewController:secondViewController];

self.viewControllers = [NSArray arrayWithObjects:firstNavController, secondNavController,nil];

firstNavController.tabBarItem.image = [UIImage imageNamed:@"blablabla.png"];
firstNavController.tabBarItem.title = @"Stream";

secondViewController.tabBarItem.image = [UIImage imageNamed:@"blabla.png"];
secondViewController.tabBarItem.title = @"Favourite";
}

```

Now I have another view controller, I call it `ViewHandlerController`, a subclass of `BaseViewController`. in my `viewDidLoad` in this `viewHandler`, i invoke `setUpViews` which is declared in `BaseViewController`. in the first screen of my app, when a Login button is pressed, I instantiate my `ViewHandlerController`, and presented my tabcontroller succesfully with nav controllers by using.

```
[[[UIApplication sharedApplication].windows objectAtIndex:0] addSubview:viewControllerHandler.view];

```

Inside my app. there is a logout button. I am using `NSNotificationCenter` to call my logoutMethod which is declared in my first screen. My question is, in this logoutMethod, how can I release the previously allocated objects to avoid memory pressure since the user can log in again (logIn - logOut -logIn)? since I'm using ARC, is setting my ViewController to NIL will do all the clean up?

EDIT: is removing my ViewControllerHandler from superview and setting it to nil helps releasing its subviews too? 

Cheers