forked from enlightenment/efl
efl_ui/active_view: fix object destruction
when the activeview is being destroyed, we can skip a lot of steps in unregistering widgets due to hierarchy-enforced deletion and class chaining of destructors. on the flip side, we also need to be cautious of triggering codepaths that will perpetuate object lifecycles past when they should be destroyed and trigger unwanted behavior. for this case, when the activeview is being destroyed we can simply efl_del all the contents to reuse existing callbacks, and then we can skip doing all the update propagation through activeview subcomponents since those will be destroyed presently. also, these subcomponents already handle subobject destruction with callbacks, so they'll automatically clean everything up. probably. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9125
This commit is contained in:
parent
2ef8894fcd
commit
cbde6377f7
|
@ -464,12 +464,10 @@ _unpack_all(Eo *obj EINA_UNUSED,
|
||||||
{
|
{
|
||||||
Eo *content = eina_list_data_get(pd->content_list);
|
Eo *content = eina_list_data_get(pd->content_list);
|
||||||
|
|
||||||
_unpack(obj, pd, content, 0);
|
|
||||||
|
|
||||||
if (clear)
|
if (clear)
|
||||||
efl_del(content);
|
efl_del(content);
|
||||||
|
else
|
||||||
pd->content_list = eina_list_remove(pd->content_list, content);
|
_unpack(obj, pd, content, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,6 +501,7 @@ _unpack(Eo *obj,
|
||||||
pd->content_list = eina_list_remove(pd->content_list, subobj);
|
pd->content_list = eina_list_remove(pd->content_list, subobj);
|
||||||
_elm_widget_sub_object_redirect_to_top(obj, subobj);
|
_elm_widget_sub_object_redirect_to_top(obj, subobj);
|
||||||
|
|
||||||
|
if (!efl_alive_get(obj)) return;
|
||||||
if (index < pd->curr.page)
|
if (index < pd->curr.page)
|
||||||
pd->curr.page--;
|
pd->curr.page--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue