Merge pull request #92733 from raulsntos/core/memdelete-engine-later-but-not-that-late
Release Engine before unregistering core types
This commit is contained in:
commit
4bf961e007
|
@ -838,13 +838,15 @@ void Main::test_cleanup() {
|
||||||
if (globals) {
|
if (globals) {
|
||||||
memdelete(globals);
|
memdelete(globals);
|
||||||
}
|
}
|
||||||
if (engine) {
|
|
||||||
memdelete(engine);
|
|
||||||
}
|
|
||||||
|
|
||||||
unregister_core_driver_types();
|
unregister_core_driver_types();
|
||||||
unregister_core_extensions();
|
unregister_core_extensions();
|
||||||
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
|
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
|
||||||
|
|
||||||
|
if (engine) {
|
||||||
|
memdelete(engine);
|
||||||
|
}
|
||||||
|
|
||||||
unregister_core_types();
|
unregister_core_types();
|
||||||
|
|
||||||
OS::get_singleton()->finalize_core();
|
OS::get_singleton()->finalize_core();
|
||||||
|
@ -2496,15 +2498,17 @@ error:
|
||||||
if (globals) {
|
if (globals) {
|
||||||
memdelete(globals);
|
memdelete(globals);
|
||||||
}
|
}
|
||||||
if (engine) {
|
|
||||||
memdelete(engine);
|
|
||||||
}
|
|
||||||
if (packed_data) {
|
if (packed_data) {
|
||||||
memdelete(packed_data);
|
memdelete(packed_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
unregister_core_driver_types();
|
unregister_core_driver_types();
|
||||||
unregister_core_extensions();
|
unregister_core_extensions();
|
||||||
|
|
||||||
|
if (engine) {
|
||||||
|
memdelete(engine);
|
||||||
|
}
|
||||||
|
|
||||||
unregister_core_types();
|
unregister_core_types();
|
||||||
|
|
||||||
OS::get_singleton()->_cmdline.clear();
|
OS::get_singleton()->_cmdline.clear();
|
||||||
|
@ -4365,12 +4369,13 @@ void Main::cleanup(bool p_force) {
|
||||||
unregister_core_driver_types();
|
unregister_core_driver_types();
|
||||||
unregister_core_extensions();
|
unregister_core_extensions();
|
||||||
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
|
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
|
||||||
unregister_core_types();
|
|
||||||
|
|
||||||
if (engine) {
|
if (engine) {
|
||||||
memdelete(engine);
|
memdelete(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unregister_core_types();
|
||||||
|
|
||||||
OS::get_singleton()->benchmark_end_measure("Shutdown", "Total");
|
OS::get_singleton()->benchmark_end_measure("Shutdown", "Total");
|
||||||
OS::get_singleton()->benchmark_dump();
|
OS::get_singleton()->benchmark_dump();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue