I've been creating a game via SpriteKit
and am using an SKScene
with SKSpriteNodes
and SkNodes
in order to do so. When the user dies, I have the parent View Controller of the SKScene
perform a segue
to a game over View Controller. I remove some of the SKSpriteNodes
, but none of the SKNodes
from the game scene. When the user presses play again, it performs a segue back to the View Controller with the SKScene
and the game will start over. I was wondering if it is necessary for me to remove the SKScene
and it's nodes from the memory after the user dies and before I segue
to the game over View Controller. Are all of the SKNodes
and SKSpriteNodes
that I created still being held in the memory somewhere? I'm asking this question due to how I noticed that after every game/match the memory for my application being displayed in Xcode and the Instruments application is higher than it was before the match/game.
*If it's relevant to the issue, I have an Admob banner and rewarded video ad loaded and displayed to the user on the game over View Controller.