What Happened to Automatic Termination in macOS?

macospreview

In Mac OS X Lion (10.7) Apple introduced a feature called "Automatic Termination" where apps would automatically quit after a while of inactivity.

I personally only ever saw this working with Preview and a few other apps. Neither Apple nor third-party developers seemed to adopt it much. And in recent years, I haven't seen a single app automatically quit, not even Preview.

My question is, what happened to this feature? Does it still exist? Do any developers make use of it? And why did Apple themselves stop using it in their apps?

Best Answer

Automatic Termination remains part of macOS. When implemented correctly, you should not see it in action.

To discover which applications know about Automatic Termination, issue the following command in Terminal.app:

grep -r NSSupportsAutomaticTermination /Applications

Requires More Code

Supporting Automatic Termination requires additional and, frequently involved, effort from the application developer.

The application needs to deal with an environment where it could be required to quit at (almost) any time; that means being able to save and restore state quickly, with no user interaction, and at (almost) any moment:

Automatic termination is a feature that you must explicitly code for in your app. Declaring support for automatic termination is easy, but apps also need to work with the system to save the current state of their user interface so that it can be restored later as needed. The system can kill the underlying process for an auto-terminable app at any time, so saving this information maintains continuity for the app. Usually, the system kills an app’s underlying process some time after the user has closed all of the app’s windows. However, the system may also kill an app with open windows if the app is not currently on screen, perhaps because the user hid it or switched spaces.

Ask Apple

Why Apple appears to have removed support from some of their applications in OS X 10.11 is a question best directed to Apple.

A Matter of Priorities

Anyone who writes Mac applications must judge if this is a feature worth implementing and if that engineering time is better spent elsewhere. This will always be a matter of judgement for the developer, so I suspect your question can never be definitively answered.

Tell Developers

If you have applications you want to support Automatic Termination, tell the application's developers. If enough customers value Automatic Termination, then developers will make the time to implement it.