From: Carsten Haitzler (Rasterman) Date: Wed, 21 Feb 2018 06:45:55 +0000 (+0900) Subject: ecore - fd handlers - only delete legacy eo objects in handlers X-Git-Tag: upstream/1.21.0~1881 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67a88795c800b307a8ff156601012846a6b455e5;p=platform%2Fupstream%2Fefl.git ecore - fd handlers - only delete legacy eo objects in handlers if its a non-legacy loop handler that also binds an fd handler internally (the 2 things are linked as a pair) then on loop del, dont del the objet as the obj del should handle things elsehwere. --- diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index f515fbc..3db509c 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -136,6 +136,7 @@ struct _Ecore_Fd_Handler Eina_Bool error_active : 1; Eina_Bool delete_me : 1; Eina_Bool file : 1; + Eina_Bool legacy : 1; }; GENERIC_ALLOC_SIZE_DECLARE(Ecore_Fd_Handler); @@ -1490,6 +1491,7 @@ ecore_main_fd_handler_add(int fd, fdh = _ecore_main_fd_handler_add(efl_loop_main_get(EFL_LOOP_CLASS), ML_DAT, NULL, fd, flags, func, data, buf_func, buf_data, EINA_FALSE); + fdh->legacy = EINA_TRUE; return fdh; } @@ -1731,7 +1733,7 @@ _ecore_main_content_clear(Efl_Loop_Data *pd) pd->fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(pd->fd_handlers), EINA_INLIST_GET(fdh)); - if (fdh->handler) efl_del(fdh->handler); + if ((fdh->handler) && (fdh->legacy)) efl_del(fdh->handler); else { // XXX: can't do this because this fd handler is legacy and might