summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-06-19 14:05:55 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-20 08:10:46 +0200
commitcbde6377f7b626d25dc8e3e63d6b3606b9321278 (patch)
tree8887ed09676705c348397ec77b6a89baf227ce27
parent2ef8894fcd415cdc24d7bc222a9f8425fb8f9f34 (diff)
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.c7
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,
464 { 464 {
465 Eo *content = eina_list_data_get(pd->content_list); 465 Eo *content = eina_list_data_get(pd->content_list);
466 466
467 _unpack(obj, pd, content, 0);
468
469 if (clear) 467 if (clear)
470 efl_del(content); 468 efl_del(content);
471 469 else
472 pd->content_list = eina_list_remove(pd->content_list, content); 470 _unpack(obj, pd, content, 0);
473 } 471 }
474} 472}
475 473
@@ -503,6 +501,7 @@ _unpack(Eo *obj,
503 pd->content_list = eina_list_remove(pd->content_list, subobj); 501 pd->content_list = eina_list_remove(pd->content_list, subobj);
504 _elm_widget_sub_object_redirect_to_top(obj, subobj); 502 _elm_widget_sub_object_redirect_to_top(obj, subobj);
505 503
504 if (!efl_alive_get(obj)) return;
506 if (index < pd->curr.page) 505 if (index < pd->curr.page)
507 pd->curr.page--; 506 pd->curr.page--;
508 507