diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-06-19 14:05:55 -0400 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-06-20 08:10:46 +0200 |
commit | cbde6377f7b626d25dc8e3e63d6b3606b9321278 (patch) | |
tree | 8887ed09676705c348397ec77b6a89baf227ce27 | |
parent | 2ef8894fcd415cdc24d7bc222a9f8425fb8f9f34 (diff) | |
download | efl-cbde6377f7b626d25dc8e3e63d6b3606b9321278.tar.gz |
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
-rw-r--r-- | src/lib/elementary/efl_ui_active_view_container.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_active_view_container.c b/src/lib/elementary/efl_ui_active_view_container.c index 9d19b07cf0..03eca6fab6 100644 --- a/src/lib/elementary/efl_ui_active_view_container.c +++ b/src/lib/elementary/efl_ui_active_view_container.c @@ -464,12 +464,10 @@ _unpack_all(Eo *obj EINA_UNUSED, { Eo *content = eina_list_data_get(pd->content_list); - _unpack(obj, pd, content, 0); - if (clear) efl_del(content); - - pd->content_list = eina_list_remove(pd->content_list, content); + else + _unpack(obj, pd, content, 0); } } @@ -503,6 +501,7 @@ _unpack(Eo *obj, pd->content_list = eina_list_remove(pd->content_list, subobj); _elm_widget_sub_object_redirect_to_top(obj, subobj); + if (!efl_alive_get(obj)) return; if (index < pd->curr.page) pd->curr.page--; |