Need to free memory after Modal Segues, but I need both my Segues to pass data from A to B and B to A
问题 I am making a game for iOS with SpriteKit. I have 2 Viewcontrollers. One is the GameViewController and the other one is the MenuViewController. Let's call them A and B respectively. When the player dies, a function is called in GameScene.swift that launches a modal "Lost" Segue to B. There, the player can restart the game or buy a life and a "Back" Segue is called to A. I need to dismiss the additional Views that get created each time I call a segue. Problem is: I need the "Lost" Segue to