Ordinary exit from the program happens via the menu command File -> Leave (Esc) without the writing of a restart file or by command File -> Quit (and save restart) (F4) with writing such file (cf. Restart).
The program might also be exited in the "general windowy'' manner, by left-clicking the cross in the upper right corner of the program window or by using the keyboard shortcut Alt+F4. Such closing of the program does not cause the writing of a restart file.