by thought_alarm · 15y ago · 0 comments
1. Application without a process: if an application has one or more open documents but no documents visible on screen, the app may terminate itself when resources are low. The applications still appears to be alive in the dock and command+tab menu, but its process has been terminated and is no longer consuming resources. When you command+tab back to the application it restarts itself and restores its previous state.
2. Process without an application: if an application has no open documents it will appear to quit automatically and is removed from the Dock and command+tab menu. In actuality, it remains running in the background ready to spring into action again.
The question is, why support behavior #2 at all?
Behavior #1 covers the automatic resource management and I think it works well (and unlike iOS, Mac applications can opt-out of this behavior). Behavior #2 seems to be aimed at Windows users who have no concept of "Quit", but it only aggravates long-time Mac users with zero actual benefit with respect to resource management. It has nothing to do with iOS and everything to do with grandma Windows users who just bought their first MacBook.
Mail. File Transfers. Staying available for chat. Rendering process that can run headless. (Handbrake, I think, plus others.)
If an application needs to do work in the background then it is not subject to automatic termination by either behavior #1 or behavior #2 and simply remains running.
http://developer.apple.com/library/mac/#documentation/Cocoa/...
If you make no changes to your application, then the OS won't touch it. And if you do decide to support sudden termination, then hopefully you would call disableSuddenTermination before starting any background file transfers, renderings, etc.