What type of memory issue is happening when switching between UIViewControllers?
<p>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 &amp; 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 &amp; make it switch, the memory spikes again. This time it spiked higher than what it spiked to last time. This continues forever &amp; ever.  Here is a picture: </p>

<p><a href="https://i.stack.imgur.com/YfeI6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YfeI6.png" alt="enter image description here"></a></p>

<p>This warning also keeps popping up in the console:</p>

<blockquote>
  <p>Warning: Attempt to present  on
   whose view is not in the window
  hierarchy!</p>
</blockquote>

<p><strong>What type of memory problem is occurring, and what could be causing the increases in memory usage?</strong></p>

<p>EDIT:</p>

<p><em>Here is how i'm going back to the slideshow view controller:</em></p>

<pre><code>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];

}
</code></pre>