MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / exit_callback

Function exit_callback

platform/web/web_main.cpp:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56static bool shutdown_complete = false;
57
58void exit_callback() {
59 if (!shutdown_complete) {
60 return; // Still waiting.
61 }
62 if (main_started) {
63 Main::cleanup();
64 main_started = false;
65 }
66 int exit_code = OS_Web::get_singleton()->get_exit_code();
67 memdelete(os);
68 os = nullptr;
69 emscripten_force_exit(exit_code); // Exit runtime.
70}
71
72void cleanup_after_sync() {
73 shutdown_complete = true;

Callers

nothing calls this directly

Calls 2

memdeleteFunction · 0.85
get_exit_codeMethod · 0.80

Tested by

no test coverage detected