I'm coding an app where the view controller will present a question and there are a series of answers. After an answer has been chosen by clicking a button then part of the code of the button will instantiate a new view controller to do the same thing again. This is proving to be a problem because it is being a memory hog according to xcode.
How can I 'dismiss' the old view controller that was just replaced by the instantiation so that the memory is freed?
How can I 'dismiss' the old view controller that was just replaced by the instantiation so that the memory is freed?