C0rupted / Vitrix

An open source FPS video game coded in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Process doesn't end when you close Vitrix from the window

C0rupted opened this issue · comments

When you click the x to close the window, the window closes, and the process doesn't stop. This uses unnecessary ram space, of up to 50 MBs.

A way around this is to terminate the process with Ctrl+C, or through the task manager, but the inefficiency is likely to be a problem when launching from gui, so a fix is required.

Looking over the code, it seems fine, even an exit() function at the end, but it is still doing it. I'm not sure about the details, but I've got some other urgent matters to attend to, so I won't work on this issue for a day or two.

Following this Stackoverflow post, it says you can use os._exit(0) or sys.exit(0). the os module is already being used in the menu, so I used that and it works! I'm commiting the changes now...

Closing issue...