How can I delete memory? (Swift)

2019-06-11 04:12发布

问题:

I have 7 ViewControllers. When I am on the first ViewController, I have a method prepare for segue to push data (variables) from one to the next ViewController. When I am on the last ViewController I have an action button, which goes to the first ViewController. All this work perfectly. My problem is that more often I do that the memory increases permanently. How can I delete the memory between the last and the first ViewController in Swift?

Thank you!