ios - Should I remove observer in applicationWillTerminate? -
I added this code in your AppDelegate.h file: I usually write it: If I have set the UIViewController classes to be the supervisor (non-ARC). While I'm thinking, if I do AppDelegate, I still insert a line: ? Method Because applications will be eliminated, Thanks in advance for it means that it
- (bool) application : (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector (saveDataAndSettings) name: UIApplicationDidEnterBackgroundNotification object: nil]; }
- (void) dealloc {[[NSNotificationCenter defaultCenter] removeObserver: self]; }
[[NSNotificationCenter defaultCenter] Htayenobsrhwar: self]; ApplicationWillTerminate in
The closure / files, and should be cleanly little thing to clean up similar to other savings such things, but there is talk of leaving about a process that is in memory or supervisors.
Comments
Post a Comment