summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2018-06-27 07:50:30 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-06-27 07:50:31 -0400
commitdf652673febd8617d3f458a5c14478534e927940 (patch)
tree60785fae3f4d250c9c460c36c70373ec52e3de7b /src/lib
parentf23344733f1e09b4b919647f0a49f9fdc9212804 (diff)
evas: move clearing cows to right place.
Summary: Evas is child of main loop now, so evas is deleted when main loop is quitted. In case of not calling evas_free() explicitly by app side, a crash occurs. So move clearing cows to below ecore_shutdown(). Test Plan: //Compile with: //gcc evas_test.c -o evas_test `pkg-config --cflags --libs ecore evas` #include <Evas.h> #include <Ecore.h> Eina_Bool _timer_cb (void *data) { ecore_main_loop_quit(); return 0; } int main(int argc, char *argv[]) { evas_init(); Evas *evas = evas_new(); Evas_Object *obj = evas_object_box_add(evas); Evas_Object *rect = evas_object_rectangle_add(evas); evas_object_color_set(rect, 255, 255, 255, 255); evas_object_resize(rect, 300, 400); evas_object_show(rect); evas_object_box_append(obj, rect); evas_object_show(obj); ecore_timer_add(2.0, _timer_cb, NULL); ecore_main_loop_begin(); evas_shutdown(); return 0; } Reviewers: devilhorns, cedric, jpeg, id213sin, woohyun, zmike Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6346
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c2
-rw-r--r--src/lib/evas/canvas/evas_main.c20
2 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 52dfc36db1..88dd59ee7c 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -667,8 +667,8 @@ ecore_evas_shutdown(void)
667 667
668 eina_log_domain_unregister(_ecore_evas_log_dom); 668 eina_log_domain_unregister(_ecore_evas_log_dom);
669 _ecore_evas_log_dom = -1; 669 _ecore_evas_log_dom = -1;
670 evas_shutdown();
671 ecore_shutdown(); 670 ecore_shutdown();
671 evas_shutdown();
672 672
673 return _ecore_evas_init_count; 673 return _ecore_evas_init_count;
674} 674}
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 2849f21ceb..50555c4ea1 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -155,9 +155,19 @@ evas_shutdown(void)
155#endif 155#endif
156 evas_cache_vg_shutdown(); 156 evas_cache_vg_shutdown();
157 157
158 evas_font_path_global_clear();
159
160 evas_filter_shutdown();
161
162 evas_thread_shutdown();
163 _evas_preload_thread_shutdown();
164 evas_async_events_shutdown();
165 evas_module_shutdown();
166
167 ecore_shutdown();
168
158 _efl_gfx_map_shutdown(); 169 _efl_gfx_map_shutdown();
159 170
160 evas_font_path_global_clear();
161 eina_cow_del(evas_object_proxy_cow); 171 eina_cow_del(evas_object_proxy_cow);
162 eina_cow_del(evas_object_map_cow); 172 eina_cow_del(evas_object_map_cow);
163 eina_cow_del(evas_object_state_cow); 173 eina_cow_del(evas_object_state_cow);
@@ -172,17 +182,9 @@ evas_shutdown(void)
172 evas_object_image_load_opts_cow = NULL; 182 evas_object_image_load_opts_cow = NULL;
173 evas_object_image_state_cow = NULL; 183 evas_object_image_state_cow = NULL;
174 184
175 evas_filter_shutdown();
176 eina_cow_del(evas_object_mask_cow); 185 eina_cow_del(evas_object_mask_cow);
177 evas_object_mask_cow = NULL; 186 evas_object_mask_cow = NULL;
178 187
179 evas_thread_shutdown();
180 _evas_preload_thread_shutdown();
181 evas_async_events_shutdown();
182 evas_module_shutdown();
183
184 ecore_shutdown();
185
186#ifdef BUILD_LOADER_EET 188#ifdef BUILD_LOADER_EET
187 eet_shutdown(); 189 eet_shutdown();
188#endif 190#endif