Fix crash when closing app on iphone
This commit is contained in:
parent
94a9cdb3b0
commit
9a90ea1425
1 changed files with 21 additions and 3 deletions
|
@ -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){};
|
||||
|
|
Loading…
Reference in a new issue