diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-18 15:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 15:23:38 +0100 |
commit | b154bc8333564a3b54c75d8abde12a7dfa1d6804 (patch) | |
tree | 8b5c120d8de084f4bbecb926c7e65fbd036bd7c0 /platform/iphone/os_iphone.cpp | |
parent | e65736c25cfaf96efbc5a87d485e07502aa87a5f (diff) | |
parent | 9a90ea14259edc6596fa73e03d635ca822d9ac37 (diff) |
Merge pull request #35265 from zxcvdev/fix_crash_iphone_ios13
Fix iOS Crash on Application Exit
Diffstat (limited to 'platform/iphone/os_iphone.cpp')
-rw-r--r-- | platform/iphone/os_iphone.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index 7b1d0e6db1..3e5ab7b886 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -356,14 +356,32 @@ void OSIPhone::delete_main_loop() { void OSIPhone::finalize() { - if (main_loop) // should not happen? - memdelete(main_loop); + delete_main_loop(); + + memdelete(input); + memdelete(ios); + +#ifdef GAME_CENTER_ENABLED + memdelete(game_center); +#endif + +#ifdef STOREKIT_ENABLED + memdelete(store_kit); +#endif + +#ifdef ICLOUD_ENABLED + memdelete(icloud); +#endif visual_server->finish(); memdelete(visual_server); // memdelete(rasterizer); - memdelete(input); + // Free unhandled events before close + for (int i = 0; i < MAX_EVENTS; i++) { + event_queue[i].unref(); + }; + event_count = 0; }; void OSIPhone::set_mouse_show(bool p_show){}; |