raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c3577929b38803b6454cfb1a9cc552cd52d082d2

commit c3577929b38803b6454cfb1a9cc552cd52d082d2
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Jan 3 19:35:20 2021 +0000

    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
---
 src/lib/elementary/elm_genlist.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index d25dbe1f57..342d26e0d3 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -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);
      }
 }
 

-- 


Reply via email to