I have a slideshow view controller where the memory usage is steady, and when you tap it, it switches to another view controller. During the switch, the memory usage spikes, and stays steady. (Which I assume is normal) Then in 30 seconds, I have it timeout & go back to the slideshow view controller, and the memory usage is higher that what it originally was for the view controller. Both of the switches are using segues. When you tap the view & make it switch, the memory spikes again. This time it spiked higher than what it spiked to last time. This continues forever & ever. Here is a picture:
This warning also keeps popping up in the console:
Warning: Attempt to present on whose view is not in the window hierarchy!
What type of memory problem is occurring, and what could be causing the increases in memory usage?
EDIT:
Here is how i'm going back to the slideshow view controller:
timeOut = [NSTimer scheduledTimerWithTimeInterval:25 target:self selector:@selector(timeOutMethod) userInfo:nil repeats:NO];
-(void) timeOutMethod{
[self performSelector:@selector(loadSlideshowView)
withObject:nil
afterDelay:5];
}
-(void) loadSlideshowView{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SlideShowViewController *myVC = (SlideShowViewController *)[storyboard instantiateViewControllerWithIdentifier:@"slideShowImages"];
[self presentViewController:myVC animated:YES completion:nil];
}