Merge pull request #92060 from raulsntos/core/memdelete-engine-later

Release Engine after unregistering GDExtensions
This commit is contained in:
Rémi Verschelde 2024-05-18 17:41:45 +02:00
commit 7437b9a833
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -4295,9 +4295,6 @@ void Main::cleanup(bool p_force) {
if (globals) {
memdelete(globals);
}
if (engine) {
memdelete(engine);
}
if (OS::get_singleton()->is_restart_on_exit_set()) {
//attempt to restart with arguments
@ -4315,6 +4312,10 @@ void Main::cleanup(bool p_force) {
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
unregister_core_types();
if (engine) {
memdelete(engine);
}
OS::get_singleton()->benchmark_end_measure("Shutdown", "Total");
OS::get_singleton()->benchmark_dump();