From: Semun Lee Date: Thu, 30 Mar 2017 08:49:18 +0000 (+0900) Subject: Clean up resources after terminate callback X-Git-Tag: submit/tizen/20170404.094507~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9033b3d8d71cb070b79c82b0cae2e809a125749f;p=platform%2Fcore%2Fappfw%2Fapp-core.git Clean up resources after terminate callback We should not clean up resources before app's terminate callback. Change-Id: I88aa7f0e123a14cb0eb50ab37076819e95fa4ad0 Signed-off-by: Semun Lee --- diff --git a/src/ui_base/appcore_ui_base.c b/src/ui_base/appcore_ui_base.c index 7c4c63c..524e8cc 100644 --- a/src/ui_base/appcore_ui_base.c +++ b/src/ui_base/appcore_ui_base.c @@ -511,23 +511,6 @@ EXPORT_API int appcore_ui_base_on_terminate(void) } __context.state = AS_DYING; - if (__context.hshow) - ecore_event_handler_del(__context.hshow); - if (__context.hhide) - ecore_event_handler_del(__context.hhide); - if (__context.hvchange) - ecore_event_handler_del(__context.hvchange); - if (__context.hlower) - ecore_event_handler_del(__context.hlower); - - __finish_wl(); - elm_shutdown(); - - /* Check loader case */ - if (getenv("AUL_LOADER_INIT")) { - unsetenv("AUL_LOADER_INIT"); - elm_shutdown(); - } appcore_base_on_terminate(); @@ -736,6 +719,25 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar EXPORT_API void appcore_ui_base_fini(void) { appcore_base_fini(); + + if (__context.hshow) + ecore_event_handler_del(__context.hshow); + if (__context.hhide) + ecore_event_handler_del(__context.hhide); + if (__context.hvchange) + ecore_event_handler_del(__context.hvchange); + if (__context.hlower) + ecore_event_handler_del(__context.hlower); + + __finish_wl(); + elm_shutdown(); + + /* Check loader case */ + if (getenv("AUL_LOADER_INIT")) { + unsetenv("AUL_LOADER_INIT"); + elm_shutdown(); + } + free(__context.appid); __context.appid = NULL; }