This is almost consistent with Apple's HIG: "In general, quit when users close the last open window in your app. [...] If users close the last remaining document window in a document-based app and switch to another app, it’s appropriate to quit the app" (emphasis added). [1]
[1]: https://developer.apple.com/library/mac/documentation/UserEx...