ios - Clear modal views from memory -
i'm having problem storyboard has beside navigation controller modal views separate them main "route" in app. when press button modal segue opens other view. the problem is: when go navigation controller , press button open modal view again, creates new instance of view controller without deleting old one. is possible clean memory when leaving modal view or something? i found solution: when finished separated modal view part, use [[self presentingviewcontroller] dismissviewcontrolleranimated:yes completion:nil]; , app goes last view controller, in case uinavigationcontroller. , this, deallocates old views.