diff options
author | Daniel Hirt <hirt.danny@gmail.com> | 2017-06-08 08:50:14 +0300 |
---|---|---|
committer | Daniel Hirt <hirt.danny@gmail.com> | 2017-06-11 23:58:52 +0300 |
commit | 97eda67737856c062018c8deb88961b602fa89ba (patch) | |
tree | 77f4fb4690ddd34cdabb3ce12e816484cbc60122 | |
parent | c45e9570791c46cc7a3ee28228e2259c406490e9 (diff) | |
download | efl-97eda67737856c062018c8deb88961b602fa89ba.tar.gz |
Ui text: fix leak of selection on destruction
-rw-r--r-- | src/lib/elementary/efl_ui_text.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 49319f12e3..235f6f99e7 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -270,6 +270,7 @@ static inline Eo * _decoration_create(Efl_Ui_Text_Data *sd, const char *file, co static void _decoration_defer(Eo *obj); static void _anchors_clear_all(Evas_Object *o EINA_UNUSED, Efl_Ui_Text_Data *sd); static void _unused_item_objs_free(Efl_Ui_Text_Data *sd); +static void _clear_text_selection(Efl_Ui_Text_Data *sd); static Mod_Api * _module_find(Evas_Object *obj EINA_UNUSED) @@ -3257,6 +3258,7 @@ _efl_ui_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Text_Data *sd) _anchors_clear_all(obj, sd); _unused_item_objs_free(sd); + _clear_text_selection(sd); text_obj = edje_object_part_swallow_get(sd->entry_edje, "elm.text"); efl_event_callback_del(text_obj, EFL_UI_TEXT_INTERACTIVE_EVENT_CHANGED_USER, @@ -4732,6 +4734,18 @@ _update_text_cursors(Eo *obj) } static void +_clear_text_selection(Efl_Ui_Text_Data *sd) +{ + Efl_Ui_Text_Rectangle *r; + + EINA_LIST_FREE(sd->sel, r) + { + free(r); + } + +} + +static void _update_text_selection(Eo *obj, Eo *text_obj) { Evas_Coord x, y; |