Note that there are some explanatory texts on larger screens.

plurals
  1. POOS X design decisions. Terminate the app on last window close?
    text
    copied!<p>Unlike Windows, GNOME and most other GUI's, OS X application programs do not all terminate if the main window (or all the windows) of that application are closed. </p> <p>For example, fire up Firefox, Safari, Word, or most document based apps. Either click the red dot in the corner or type <kbd>cmd</kbd><kbd>W</kbd> to close the window. You can see that the menu of that program is still active, and the program is still running. With OS X newbies, sometimes you will see dozens of these windowless zombies running and they wonder why their computer is getting slower.</p> <p>With some document based programs, there is some sense to not terminating the application if it has no windows. For example, with Safari or Word, you can still type <kbd>Cmd</kbd><kbd>N</kbd> and get a new document window for whatever that application was designed to do: browse the web (Safari) or type a new document (Word).</p> <p>Apple is mixed with their design philosophy on this. Some close on the last window closed and some do not. Third party apps are even more mixed. </p> <p>There are other apps that do close when their red close button is clicked. System Preferences, Dictionary, the Mac App Store, iPhoto and Calculator do terminate when the sole or last window is closed. iCal, Address Book, iTunes, DVD Player do not terminate. </p> <p>What I find particularly annoying is the applications that do not have a logical "New Document" or "Open" function yet they do not terminate when the document window is closed. Example: fire up iTunes or Address Book and terminate the main window. There sits a zombie with no window and no function other than manually selecting "Quit".</p> <p>It is easy to close the application after the last window closes. Cocoa even gives you notification of that event. Just add this to your application delegate:</p> <pre><code> - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { return YES; } </code></pre> <p>My question is this: Is there any reason I should NOT terminate my application after the last window closes? Why is this so variable on OS X software? Unless the app has a "new" or "open" or some other clearly understood reason to not terminate with no window open, the failure to terminate seems like a bug to me. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload