Fix program termination sequence and a lot of memory leaks during it
commit71dd677ea18e4071bbf6d6baff903e097f54c74a
authorDmitry D. Chernov <blackdoomer@yandex.ru>
Tue, 13 Feb 2024 09:58:37 +0000 (13 19:58 +1000)
committerDmitry D. Chernov <blackdoomer@yandex.ru>
Tue, 13 Feb 2024 09:58:37 +0000 (13 19:58 +1000)
treea84c89b94db0423a45a3b43e06659fbadd361709
parentf61696ae2d3c5392ede1f6a4cea18e87d68721cd
Fix program termination sequence and a lot of memory leaks during it
Along with this, the following bugs have been fixed, I hope:
1. Network operations didn't complete if game was ended by closing the window ('wLoadingQuit' had no effect whatsoever).
2. Restored and fixed the menu cleanup (was disabled in 1f93eba2).
3. Potential crash if new events appeared in the system queue when the game was shut down (i.e. after g_Game_Quit() call).
src/game/g_game.pas
src/game/g_main.pas
src/game/g_menu.pas
src/game/g_netmaster.pas
src/game/g_window.pas
src/game/sdl/g_system.pas
src/game/sdl2/g_system.pas
src/game/stub/g_system.pas