As far as I can tell, there are lots of methods to close a window. performClose: orderOut: close
So, the obvious question is: Which one to use? And which method sends the delegate method windowShouldClose and windowWillClose?
-orderOut: doesn’t close the window. It only takes it off the screen. -performClose: is called when the user clicks on the close button. If you call it, it is the same as if the user clicked it.
To use performClose is probably “kinder” and easier for you later, unless you wish to override notifications or quickly move past user actions:
close: is indeed called by performClose after everything else is done.