Right now CM will exit immediately if you close it.
If CM is currently running GCode, it should confirm that the user wants to exit. Just saw a post today from another user that this has happened to, I have also accidentally closed CM while a program is running.