views:

62

answers:

2

So there's one piece of technology new to Snow Leopard that I haven't heard of. Sudden termination (see Sudden termination in this Apple doc) is apparently a mechanism for telling the system when it is OK for your application to be killed brutally instead of going through the standard quitting mechanism. This is supposed to help faster log-off/power-off/hibernation.

First, I didn't know about it, didn't see it discussed here or anywhere, so: Is it used widely? What are the typical use cases (I imagine simple utility apps with no user documents or information to save)?

Second, the app can at anytime signal that it's unsafe to kill it, so it looks like there isn't really a drawback to this mechanism (except, of course, possible bugs in signaling safe/unsafe moments). Am I overlooking anything obvious?

+2  A: 

There have been a few mentions in Apple mailing lists, such as: http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg00113.html

Certainly you can use it in an app with user documents. As you say, the app can signal when it is or is not ready to be nuked, so it can just say "please don't kill me" if there are any unsaved documents. Of course you could also consider some kind of auto-saving scheme, which would make your app less vulnerable to crashes as well as more friendly to sudden termination.

JWWalker