Using: Xcode 4.6 Storyboards ARC Model segue to SecondViewController
I have an app that has the main ViewController that loads a new veiwController when the device is rotated to the right. When the app starts everything works great. If I rotate the device, then back which unloads the secondview controller, about 15-20 times the app is very slugish. I have narrowed down that it only happenes when the seconed view controller is loaded and only when i rotate the device a nunmber of times. I also have narrowed down that is is a memory issue. I installed an app that keeps track of the memory used and available. My memory goes from 400mb to 900mb used when i rotate the device a number of times. I am trying to give as much info as I can. Each view has 8 NSTimers that fire every second.
Is there a way to programmatic unload a view, to make sure is is being unloaded?
I have included this code to ensure the loading and unloading:
`- (void)setView:(UIView *)aView { NSLog(@">>> Entering %s <<<", PRETTY_FUNCTION);
if (!aView) // view is being set to nil
{
NSLog(@"Should be unloading now");
}
[super setView:aView];
NSLog(@"<<< Leaving %s >>>", __PRETTY_FUNCTION__);
}
log result: 2013-04-22 16:42:03.588 xxxxxxxx[xxxxxxx] >>> Entering -[GraphViewController setView:] <<< 2013-04-22 16:42:03.589 xxxxxxxx[xxxxxxx] <<< Leaving -[GraphViewController setView:] >>>
` I am not sure what I need to be looking at to correct this.
Any "points" in the right direction will be very appreciated .
Thanks