Removes the window from the screen.
- macOS 10.0+
If the window is set to be released when closed, a
release message is sent to the object after the current event is completed. For an
NSWindow object, the default is to be released on closing, while for an
NSPanel object, the default is not to be released. You can use the
released property to change the default behavior.
A window doesn’t have to be visible to receive the close message. For example, when the application terminates, it sends the close message to all windows in its window list, even those that are not currently visible.
The close method posts an
NSWindow notification to the default notification center.
The close method differs in two important ways from the
It does not attempt to send a
windowmessage to the window or its delegate.
It does not simulate the user clicking the close button by momentarily highlighting the button.
perform if you need these features.