summaryrefslogtreecommitdiff
path: root/src/lib/emotion
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/emotion
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/emotion')
-rw-r--r--src/lib/emotion/emotion_webcam.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c
index 7893e19..1e1db06 100644
--- a/src/lib/emotion/emotion_webcam.c
+++ b/src/lib/emotion/emotion_webcam.c
@@ -273,12 +273,9 @@ _emotion_enumerate_all_webcams(void)
273 273
274Eina_Bool emotion_webcam_init(void) 274Eina_Bool emotion_webcam_init(void)
275{ 275{
276 if (EMOTION_WEBCAM_UPDATE == 0) 276 EMOTION_WEBCAM_UPDATE = ecore_event_type_new();
277 { 277 EMOTION_WEBCAM_ADD = ecore_event_type_new();
278 EMOTION_WEBCAM_UPDATE = ecore_event_type_new(); 278 EMOTION_WEBCAM_DEL = ecore_event_type_new();
279 EMOTION_WEBCAM_ADD = ecore_event_type_new();
280 EMOTION_WEBCAM_DEL = ecore_event_type_new();
281 }
282 279
283 eet_init(); 280 eet_init();
284 _emotion_webcams_edds_new(); 281 _emotion_webcams_edds_new();