elm - genlist - fix leak if someone steals objects on unrealize

elm_genlist_item_all_contents_unset() can steal away the item content.
this is how you do a cache of your own objects... BUT this meant
genlist couldnt remove its hash entires... as it lost them. this fixes
that. leak fixed. (this affected evisum)

@fix
This commit is contained in:
Carsten Haitzler 2021-01-03 19:35:20 +00:00
parent b27a0f2b2d
commit c3577929b3
1 changed files with 2 additions and 0 deletions

View File

@ -7410,6 +7410,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
Evas_Object *content;
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
EINA_LIST_FREE(it->contents, content)
{
@ -7417,6 +7418,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
edje_object_part_unswallow(VIEW(it), content);
evas_object_hide(content);
if (l) *l = eina_list_append(*l, content);
eina_hash_del_by_key(sd->content_item_map, &content);
}
}