aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-08-13 18:16:26 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-08-14 09:50:30 +0300
commit9d9c9aa157bfd79131aac32c6e929cef05ca1bc5 (patch)
tree2a06795fd297445f8ad1f175ead921da1967cb78
parentecore_evas: define the predefine for wl2 instead of wayland (diff)
downloadefl-9d9c9aa157bfd79131aac32c6e929cef05ca1bc5.tar.gz
Canvas text: free style on destruction
Note on the particular way to do this (first, remove from the objects list, then call "style_free".
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 8e6df24129..a04eebc507 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -12921,9 +12921,16 @@ evas_object_textblock_init(Evas_Object *eo_obj)
}
EOLIAN static void
-_efl_canvas_text_efl_object_destructor(Eo *eo_obj, Efl_Canvas_Text_Data *o EINA_UNUSED)
+_efl_canvas_text_efl_object_destructor(Eo *eo_obj, Efl_Canvas_Text_Data *o)
{
+ Evas_Textblock_Style *style;
evas_object_textblock_free(eo_obj);
+ EINA_LIST_FREE(o->styles, style)
+ {
+ style->objects = eina_list_remove(style->objects, eo_obj);
+ evas_textblock_style_free(style);
+ }
+
efl_destructor(efl_super(eo_obj, MY_CLASS));
}