summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
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/ecore_evas
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/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas_ews.c1
-rw-r--r--src/lib/ecore_evas/ecore_evas_extn.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c
index ee40f00d31..77a33f7094 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -684,7 +684,6 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
684void 684void
685_ecore_evas_ews_events_init(void) 685_ecore_evas_ews_events_init(void)
686{ 686{
687 if (ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE != 0) return;
688 ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE = ecore_event_type_new(); 687 ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE = ecore_event_type_new();
689 ECORE_EVAS_EWS_EVENT_ADD = ecore_event_type_new(); 688 ECORE_EVAS_EWS_EVENT_ADD = ecore_event_type_new();
690 ECORE_EVAS_EWS_EVENT_DEL = ecore_event_type_new(); 689 ECORE_EVAS_EWS_EVENT_DEL = ecore_event_type_new();
diff --git a/src/lib/ecore_evas/ecore_evas_extn.c b/src/lib/ecore_evas/ecore_evas_extn.c
index 141bd78363..6f0beaed3b 100644
--- a/src/lib/ecore_evas/ecore_evas_extn.c
+++ b/src/lib/ecore_evas/ecore_evas_extn.c
@@ -11,7 +11,6 @@ EAPI int ECORE_EVAS_EXTN_CLIENT_DEL = 0;
11void 11void
12_ecore_evas_extn_init(void) 12_ecore_evas_extn_init(void)
13{ 13{
14 if (ECORE_EVAS_EXTN_CLIENT_ADD != 0) return ;
15 ECORE_EVAS_EXTN_CLIENT_ADD = ecore_event_type_new(); 14 ECORE_EVAS_EXTN_CLIENT_ADD = ecore_event_type_new();
16 ECORE_EVAS_EXTN_CLIENT_DEL = ecore_event_type_new(); 15 ECORE_EVAS_EXTN_CLIENT_DEL = ecore_event_type_new();
17} 16}