title: Swift 3: kill the previous scene
body: <p>I have a scene in my game view controller but i want to kill it when the player dies. This is because when the player restarts the game the fps decreases as the previous scenes are still running. My game runs on being repetitive and so there are multiple places where functions are called every point second. This is why the fps keeps decreasing. How can i input a method to kill the scene.</p>