From 7a72796920041e9a0410a670f22e57f6c0250c88 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 9 Dec 2019 18:27:37 +0100 Subject: [PATCH] efl_ui_pan: stop leaking content pans implementation of Efl.Content is different to each other implementation, setting the content to NULL is not really deleting the obejct, since this is done at those widgets that are actaully using the pan. This is weird and fine in the same way, as the pan is only internal. However, when we are shutting down, we must free the content here. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10838 --- src/lib/elementary/efl_ui_pan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_pan.c b/src/lib/elementary/efl_ui_pan.c index 72e5c60a93..b86d68bdc6 100644 --- a/src/lib/elementary/efl_ui_pan.c +++ b/src/lib/elementary/efl_ui_pan.c @@ -110,7 +110,9 @@ _efl_ui_pan_efl_object_constructor(Eo *obj, Efl_Ui_Pan_Data *_pd EINA_UNUSED) EOLIAN static void _efl_ui_pan_efl_object_destructor(Eo *obj, Efl_Ui_Pan_Data *sd EINA_UNUSED) { - efl_content_set(obj, NULL); + /* our implementation is a little bit incomplete, efl_content_set(obj, NULL) does not delete the content, However, if we do that, list grid and scroller would fail, because the assume ownership of the content */ + Eo *content = efl_content_unset(obj); + efl_del(content); efl_destructor(efl_super(obj, MY_CLASS)); }