ios - Should I remove observer in applicationWillTerminate? -


I added this code in your AppDelegate.h file:

  - (bool) application : (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector (saveDataAndSettings) name: UIApplicationDidEnterBackgroundNotification object: nil]; }  

I usually write it:

  - (void) dealloc {[[NSNotificationCenter defaultCenter] removeObserver: self]; }  

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:

  [[NSNotificationCenter defaultCenter] Htayenobsrhwar: self]; ApplicationWillTerminate in  

? Method

Because applications will be eliminated,

Thanks in advance for it means that it dealloc or either more cleaning There is no need to, or

app: . The application process has to go away.

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

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -