Hi, Do you have a specific test case for this? I would like to see a unit test added to ensure we don't see this bug again.
Thanks! On Thu, Jun 21, 2018 at 1:10 AM SangHyeon Lee <[email protected]> wrote: > sanghyeonlee pushed a commit to branch master. > > > http://git.enlightenment.org/core/efl.git/commit/?id=ac9dfe7e46d640ca98fb1c2cb8a3027cd1b00b24 > > commit ac9dfe7e46d640ca98fb1c2cb8a3027cd1b00b24 > Author: SangHyeon Lee <[email protected]> > Date: Thu Jun 21 14:09:06 2018 +0900 > > elm_gengrid : fix gengrid cached items disapearing issue by wrong > reference counting > > gengrid item view is managed by cache while scrolling, > but efl_wref_add/del and VIEW_ADD is not paired well. > > this commit is fixing the issue of item dispearing when it scrolls. > > Signed-off-by: SangHyeon Lee <[email protected]> > --- > src/lib/elementary/elm_gengrid.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/lib/elementary/elm_gengrid.c > b/src/lib/elementary/elm_gengrid.c > index 95108e3bef..fccee49411 100644 > --- a/src/lib/elementary/elm_gengrid.c > +++ b/src/lib/elementary/elm_gengrid.c > @@ -146,7 +146,8 @@ _item_cache_free(Item_Cache *itc) > if (!itc) return; > > evas_object_del(itc->spacer); > - evas_object_del(itc->base_view); > + efl_wref_del(itc->base_view, &itc->base_view); > + efl_del(itc->base_view); > eina_stringshare_del(itc->item_style); > EINA_LIST_FREE(itc->contents, c) > evas_object_del(c); > @@ -203,7 +204,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) > } > > itc->spacer = it->spacer; > - itc->base_view = VIEW(it); > + efl_wref_add(VIEW(it), &itc->base_view); > itc->item_style = eina_stringshare_add(it->itc->item_style); > itc->contents = contents; > > @@ -231,7 +232,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) > evas_object_hide(itc->base_view); > evas_object_move(itc->base_view, -9999, -9999); > it->spacer = NULL; > - if (!it->base->view) efl_wref_del(it->base->view, &it->base->view); > + efl_wref_del(it->base->view, &it->base->view); > VIEW(it) = NULL; > > _item_cache_clean(sd); > @@ -264,6 +265,7 @@ _item_cache_find(Elm_Gen_Item *it) > it->spacer = itc->spacer; > VIEW_SET(it, itc->base_view); > itc->spacer = NULL; > + efl_wref_del(itc->base_view, &itc->base_view); > itc->base_view = NULL; > > itc->contents = eina_list_free(itc->contents); > > -- > > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
