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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10838
This commit is contained in:
Marcel Hollerbach 2019-12-09 18:27:37 +01:00 committed by Cedric BAIL
parent abc1cb0043
commit 7a72796920
1 changed files with 3 additions and 1 deletions

View File

@ -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));
}