I think I’ve encountered what could be a bug with
Exit() in some projects.
Monogame version : 22.214.171.1240
How to reproduce it:
Create a cross platform desktop project.
Create a Song:
Then, in LoadContent, load it :
music = Content.Load<Song>("cool");
Compile and run project.
The window closes, but the process goes on running (need to kill it or stop it from VS interface).
If you do the same with a Windows project, the problem is not present.
Workaround : use
Environment.Exit(0) instead of
Exit(). But I don’t know if it’s a good way to properly exit the program.
Environment.Exit(0) is not a clean workaround since the program exists with a warning:
AL lib: (EE) alc_cleanup: 1 device not closed