Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I'm willing to believe (as I have never specifically tested this) that suspended third-party from-the-App-Store ("User") applications are immediately killed without this first stage (although then it would seem weird that they participate in the cross-application memory warning system at all)

According to the iOS Application Programming Guide[0],

> Suspended apps are not notified of termination but f your app is currently running in the background state (and not suspended), the system calls the applicationWillTerminate: method of your app delegate.

(this is the iOS5 doc, but the iOS 4 version essentially said the same thing)

So a suspended app is killed immediately, a running (backgrounded) app gets the standard applicationWillTerminate: message.

[0] http://developer.apple.com/library/ios/#documentation/iPhone...



I guess the logic behind that decision is that unsuspending an app and allowing it to run arbitrary code while the system is in a low memory condition will take memory.

Because of that, the likely effect of informing swapped-out processes that they will be killed is an avalanche of suspend/unsuspend events, resulting in an unresponsive sytem, similar to the effect of VM trashing.


> I guess the logic behind that decision is that unsuspending an app and allowing it to run arbitrary code while the system is in a low memory condition will take memory.

Even more so as a suspended application already got a message indicating that it was suspended, so it already had the opportunity to perform operations it needs to perform (mostly persisting state).

> Because of that, the likely effect of informing swapped-out processes

iOS does not swap, the VM only ever uses real memory, suspended processes live fully in real memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: