Quick question:
I have a singleton class which is a registered for several NSNotifications. Since Singletons last over the app’s lifetime.
Do I have to implement
[NSNotificationCenter defaultCenter] removeObserver:self]
In my singleton class?
Whats the right way to deal with NSNotification center in Singletons in iOS?
Thanks
No, you don’t need to stop observing in this case. The only time that the memory used by a true Singleton will ever be deallocated is when the program exits. When the program exits, it goes ahead and deallocates all of the memory and resources that are being used anyway.