From eaf2a8d7ecd3a8ae29e48abf0d6f81211041188e Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 9 Dec 2019 18:42:02 +0100 Subject: [PATCH] efl_ui_collection: do not leak this fixes leaking of membership to a pan object, additionally this also fixes the leaking of the pan object. This code was written with the thought that edje deletes its children, long story short: no it does not. While fixing the leak of the pan object, the error was found that the membership of the item to the pan object was leaked, which ended up in the item beeing deleted, even if its not part of the object anymore. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10841 --- src/lib/elementary/efl_ui_collection.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c index 43b1b19521..f40a366c76 100644 --- a/src/lib/elementary/efl_ui_collection.c +++ b/src/lib/elementary/efl_ui_collection.c @@ -438,6 +438,8 @@ _efl_ui_collection_efl_object_invalidate(Eo *obj, Efl_Ui_Collection_Data *pd EIN while(pd->items) efl_del(pd->items->data); + efl_del(pd->pan); + efl_invalidate(efl_super(obj, MY_CLASS)); } @@ -704,6 +706,7 @@ unregister_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item) efl_event_callback_array_del(item, active_item(), obj); efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item); efl_ui_item_container_set(item, NULL); + efl_canvas_group_member_remove(pd->pan, item); return EINA_TRUE; }