summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-03-04 16:00:58 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-03-04 16:09:51 -0800
commit15ddd174a1f30b26f5cc67ce983bcc6ce0567031 (patch)
treef22e7b0954d06866403807a4cc612ef2bb8ca25e
parent74161be6f8568e6b18661a876c32738a191e529f (diff)
ecore: better resources use in the glib integration
Summary: When glib support is enabled (HAVE_GLIB), _ecore_glib_init() was always reserving resources. However, its counterpart may not be called when: - glib is not always integrated and - when a user didn't explicitly required the integration. Calling _ecore_glib_init() within the request code will cause the resources to be reserved only when the integration with glib is required and furthermore guarantees that resources always have a chance to be released. Reviewers: cedric, raster Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3749 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore/ecore.c1
-rw-r--r--src/lib/ecore/ecore_glib.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 0a5b1d82ee..247612b4cf 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -248,7 +248,6 @@ ecore_init(void)
248 _ecore_exe_init(); 248 _ecore_exe_init();
249#endif 249#endif
250 _ecore_thread_init(); 250 _ecore_thread_init();
251 _ecore_glib_init();
252 _ecore_job_init(); 251 _ecore_job_init();
253 _ecore_time_init(); 252 _ecore_time_init();
254 253
diff --git a/src/lib/ecore/ecore_glib.c b/src/lib/ecore/ecore_glib.c
index e2586c1b27..7232d15ea5 100644
--- a/src/lib/ecore/ecore_glib.c
+++ b/src/lib/ecore/ecore_glib.c
@@ -275,6 +275,9 @@ ecore_main_loop_glib_integrate(void)
275 _ecore_glib_select_original = func; 275 _ecore_glib_select_original = func;
276 ecore_main_loop_select_func_set(_ecore_glib_select); 276 ecore_main_loop_select_func_set(_ecore_glib_select);
277 _ecore_glib_active = EINA_TRUE; 277 _ecore_glib_active = EINA_TRUE;
278
279 /* Init only when requested */
280 _ecore_glib_init();
278 return EINA_TRUE; 281 return EINA_TRUE;
279#else 282#else
280 ERR("No glib support"); 283 ERR("No glib support");