win/widget: free array when object is deleted.
authorWoochanlee <wc0917.lee@samsung.com>
Wed, 20 May 2020 04:42:32 +0000 (13:42 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 20 May 2020 21:20:48 +0000 (06:20 +0900)
It makes a memory leak.

Change-Id: I25cd5c742f8ebbf0ace4511af38505aac6bc892e

src/lib/elementary/efl_ui_widget.c

index ba06330..6e07e1c 100644 (file)
@@ -5837,6 +5837,12 @@ _efl_ui_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
      eina_stringshare_del(sd->atspi_translation_domain);
    ///
 
+   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));
    sd->on_destroy = EINA_FALSE;