summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 11:14:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 11:14:37 +0900
commitff24ac2d6ddaafba49ae5100f17fe37e5d874140 (patch)
treeb98881dd9ccb98896bbc8784a91e6b61a7403b41 /src/lib/efreet
parent47bf356435d7b4562e64f45ef59dbf190dff16c7 (diff)
efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would become invalid, since they are now stored in a dynamic array rather than a statically stored array. The risk here is that if a module of EFL tends to init/shutdown in a "normal" scenario then the event type array will grow in a leaking manner. This could be fixed by resetting those event ID's only when the loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using EFL_EVENT_DEL in this patch as this would add too many event callbacks to the main loop object, which may result in slightly slower event calls to it, affecting the overall performance.
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_cache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
index e377b0e31f..0df7a7b887 100644
--- a/src/lib/efreet/efreet_cache.c
+++ b/src/lib/efreet/efreet_cache.c
@@ -283,12 +283,9 @@ efreet_cache_init(void)
283 ERR("Failed to create directory '%s'", buf); 283 ERR("Failed to create directory '%s'", buf);
284 } 284 }
285 285
286 if (EFREET_EVENT_ICON_CACHE_UPDATE == 0) 286 EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
287 { 287 EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new();
288 EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new(); 288 EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new();
289 EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new();
290 EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new();
291 }
292 289
293 themes = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_theme_free)); 290 themes = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_theme_free));
294 icons = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_free)); 291 icons = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_free));