In the controller, we added the observer to viewDidAppearand deleted it in viewWillDisappear. There is init/viewDidLoadno observer.
In this case, the bottom line for security purposes / is required in the method dealloc?
[[NSNotificationCenter defaultCenter] removeObserver:self];
Now the question arises / are there any scenarios in which it deallocwill be called without viewWillDisappearwhich will not be called? How about when memory alerts are triggered. What happens in these cases?
Thank.
source
share