In my app, I have 3 different subclasses of SKScene for my menu, game, and game over screens. When the player hits an obstacle during the game, I present a new game over scene using:
EndGame *endGame = [[EndGame alloc] initWithSize:[UIScreen mainScreen].bounds.size];
SKView *spriteView = (SKView *)self.view;
[spriteView presentScene:endGame];
However, my gameScene is still running in the background (I can tell by printing a message in the update method). How can I make sure to deallocate the instance of the gameScene when I present the game over scene?
Currently, when I move between scenes my memory usage slowly increments.