efl: Reset ecore event types on init
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 19 Dec 2017 02:14:37 +0000 (11:14 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 10 Jan 2018 11:08:13 +0000 (20:08 +0900)
commit9b5098a4cd64bc684b5b908b67c78947268ec650
tree97e25b3c5d3e7ccee38ff2f538d46c854614d8aa
parentc5f5b26d79b839707349c646a504dcb5d06348f4
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.
16 files changed:
src/lib/ecore_evas/ecore_evas_ews.c
src/lib/ecore_evas/ecore_evas_extn.c
src/lib/ecore_wayland/ecore_wl.c
src/lib/ecore_win32/ecore_win32.c
src/lib/ecore_x/ecore_x.c
src/lib/ecore_x/ecore_x_dnd.c
src/lib/eeze/eeze_sensor.c
src/lib/efreet/efreet_cache.c
src/lib/eio/eio_monitor.c
src/lib/elementary/elm_config.c
src/lib/elementary/elm_main.c
src/lib/elementary/elm_systray.c
src/lib/elementary/elm_thumb.c
src/lib/elocation/elocation.c
src/lib/elput/elput.c
src/lib/emotion/emotion_webcam.c