I am presenting a view controller programmatically onto a navigation controller, and I discovered that after popping (if pushed) or dismissing (if modal) the presented view controller, it doesn't deallocate the view controller and is still retained by the navigation controller.
What is the proper way to ensure that a programmatically presented view controller will NOT be retained by the navigation controller and will deallocate once it is popped/dismissed?
MyNewViewController *myNewViewController = (MyNewViewController*)[[UIStoryboard storyboardWithName:@"MyNewViewController" bundle:nil] instantiateInitialViewController];
[self.navigationController presentViewController:myNewViewController animated:YES completion:nil];