summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-09 18:42:02 +0100
committerCedric BAIL <cedric.bail@free.fr>2019-12-13 09:32:58 -0800
commiteaf2a8d7ecd3a8ae29e48abf0d6f81211041188e (patch)
treedb33afd9d008719a6e0c11b45550456d28690de6
parente81dc6a02b637b394a59490527134434d4309523 (diff)
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 <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10841
-rw-r--r--src/lib/elementary/efl_ui_collection.c3
1 files changed, 3 insertions, 0 deletions
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
438 while(pd->items) 438 while(pd->items)
439 efl_del(pd->items->data); 439 efl_del(pd->items->data);
440 440
441 efl_del(pd->pan);
442
441 efl_invalidate(efl_super(obj, MY_CLASS)); 443 efl_invalidate(efl_super(obj, MY_CLASS));
442} 444}
443 445
@@ -704,6 +706,7 @@ unregister_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item)
704 efl_event_callback_array_del(item, active_item(), obj); 706 efl_event_callback_array_del(item, active_item(), obj);
705 efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item); 707 efl_ui_position_manager_entity_item_removed(pd->pos_man, id, item);
706 efl_ui_item_container_set(item, NULL); 708 efl_ui_item_container_set(item, NULL);
709 efl_canvas_group_member_remove(pd->pan, item);
707 710
708 return EINA_TRUE; 711 return EINA_TRUE;
709} 712}