win/widget: free array when object is deleted.

It makes a memory leak.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11522
This commit is contained in:
Hosang Kim 2020-03-17 04:12:19 +00:00 committed by Marcel Hollerbach
parent bd22ee962f
commit 5b8dc56100
2 changed files with 8 additions and 0 deletions

View File

@ -4882,6 +4882,11 @@ _efl_ui_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
efl_weak_unref(&sd->logical.parent);
sd->logical.parent = NULL;
}
if (sd->children)
{
eina_array_free(sd->children);
sd->children = NULL;
}
sd->on_destroy = EINA_TRUE;
efl_destructor(efl_super(obj, EFL_UI_WIDGET_CLASS));

View File

@ -3182,6 +3182,9 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
eina_array_free(sd->profile.available);
sd->profile.available = NULL;
eina_array_free(sd->planned_changes);
sd->planned_changes = NULL;
free(sd->wm_rot.rots);
sd->wm_rot.rots = NULL;