I'm using presentModalViewController to pop a new viewcontroller into display which loads certain things like a UIWebView or a remote UIImage. To dismiss these I call
This works just fine, but it doesn't actually unload or free the current viewController. Except for the obvious memory hog this will cause eventually, it's also a pain when loading a UIWebView, the first time it'll properly load the selection you made, but dismissing it and calling that same ModalViewController with a new selection will keep the old UIWebView loaded.
What's the proper way to unload these viewcontrollers so that they get re-initialized upon calling them again ?
Code:
[self dismissModalViewControllerAnimated:YES];
This works just fine, but it doesn't actually unload or free the current viewController. Except for the obvious memory hog this will cause eventually, it's also a pain when loading a UIWebView, the first time it'll properly load the selection you made, but dismissing it and calling that same ModalViewController with a new selection will keep the old UIWebView loaded.
What's the proper way to unload these viewcontrollers so that they get re-initialized upon calling them again ?