• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate


  • Subject: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
  • From: JongAm Park <email@hidden>
  • Date: Thu, 25 May 2006 23:52:42 -0700

Hello.

I would like to terminate a thread when an application program quits.
So, I tried checking when the "Quit" is invoked. One simple approach is to set a flag when applicationWillTerminate: or applicationShouldTerminate is invoked.
I don't know which one is called first. So I put NSLog() into each method.
It turned out that applicationShouldTerminated is called first.


However, Apple's document says that they are called immediately before an application quit.
So, I am not sure if the order of calling is always preserved, or sometimes it changes.


Is the applicationShouldTerminated called before applicationWillTerminate always?

Thank you.
JongAm Park
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
      • From: Uli Kusterer <email@hidden>
    • Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
      • From: Greg Herlihy <email@hidden>
    • Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
      • From: Andrew Bowman <email@hidden>
  • Prev by Date: Re: user-stoppable program
  • Next by Date: Re: user-stoppable program
  • Previous by thread: Re: How to invalidate NSTimer
  • Next by thread: Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
  • Index(es):
    • Date
    • Thread