Frames remain potentially visible until you explicitly delete them. A deleted frame cannot appear on the screen, but continues to exist as a Lisp object until there are no references to it.
This function deletes the frame frame. By default, frame is the selected frame.
A frame may not be deleted if its minibuffer is used by other frames. Normally, you cannot delete the last non-minibuffer-only frame (you must use
save-buffers-kill-emacsorkill-emacs). However, if optional second argument force is non-nil, you can delete the last frame. (This will automatically callsave-buffers-kill-emacs.)