Freeing Global Memory list on destructor
authorAli Alzyod <ali198724@gmail.com>
Tue, 9 Apr 2019 15:17:13 +0000 (15:17 +0000)
committerYeongjong Lee <yj34.lee@samsung.com>
Wed, 24 Apr 2019 05:24:47 +0000 (14:24 +0900)
Issue with global list item, used to same styles. (in destructor we do not remove styles from it, which will cause memory leak)

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8578

src/lib/evas/canvas/evas_object_textblock.c

index cfbc369..a6211db 100644 (file)
@@ -14282,6 +14282,7 @@ evas_object_textblock_free(Evas_Object *eo_obj)
         ts->objects = eina_list_remove(ts->objects, eo_obj);
         if (!ts->objects && (ts->delete_me || o->auto_styles))
           {
+             _style_cache = eina_list_remove(_style_cache, ts);
              evas_textblock_style_free(ts);
           }
         free(use);