There are three ways to exit from the Map Editor:
Select Exit from the File menu
Press <Alt + F4>
Select Close from the System menu
You are asked whether you want to save any unsaved work.