summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-22 10:12:44 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-22 10:54:45 +0900
commit647dc0432b2de4e342e39c55ae538e46384cc011 (patch)
tree1364729878f7229329bddc49dc8c333435a86552
parente64f4ff0ffb65a26c96bec98a3f9b728bab87b26 (diff)
elm: Removed unnecessary null check for eina_stringshare_del.
-rw-r--r--src/lib/elc_fileselector_button.c6
-rw-r--r--src/lib/elc_multibuttonentry.c10
-rw-r--r--src/lib/elc_popup.c4
-rw-r--r--src/lib/elm_access.c4
-rw-r--r--src/lib/elm_atspi_object.c4
-rw-r--r--src/lib/elm_colorselector.c8
-rw-r--r--src/lib/elm_config.c26
-rw-r--r--src/lib/elm_entry.c11
-rw-r--r--src/lib/elm_font.c8
-rw-r--r--src/lib/elm_genlist.c8
-rw-r--r--src/lib/elm_icon.c2
-rw-r--r--src/lib/elm_image.c6
-rw-r--r--src/lib/elm_main.c18
-rw-r--r--src/lib/elm_map.c12
-rw-r--r--src/lib/elm_menu.c16
-rw-r--r--src/lib/elm_progressbar.c2
-rw-r--r--src/lib/elm_segment_control.c4
-rw-r--r--src/lib/elm_thumb.c20
-rw-r--r--src/lib/elm_widget.c11
-rw-r--r--src/lib/elm_win.c8
20 files changed, 83 insertions, 105 deletions
diff --git a/src/lib/elc_fileselector_button.c b/src/lib/elc_fileselector_button.c
index 363c9a311..40c12b5a9 100644
--- a/src/lib/elc_fileselector_button.c
+++ b/src/lib/elc_fileselector_button.c
@@ -201,9 +201,9 @@ _elm_fileselector_button_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED
201{ 201{
202 Elm_Fileselector_Button_Smart_Data *sd = _pd; 202 Elm_Fileselector_Button_Smart_Data *sd = _pd;
203 203
204 if (sd->window_title) eina_stringshare_del(sd->window_title); 204 eina_stringshare_del(sd->window_title);
205 if (sd->fsd.path) eina_stringshare_del(sd->fsd.path); 205 eina_stringshare_del(sd->fsd.path);
206 if (sd->fsw) evas_object_del(sd->fsw); 206 evas_object_del(sd->fsw);
207 207
208 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 208 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
209} 209}
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 62dc1d127..c89e2feee 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -1530,12 +1530,12 @@ _elm_multibuttonentry_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1530 1530
1531 sd->selected_it = NULL; 1531 sd->selected_it = NULL;
1532 1532
1533 if (sd->label_str) eina_stringshare_del(sd->label_str); 1533 eina_stringshare_del(sd->label_str);
1534 if (sd->guide_text_str) eina_stringshare_del(sd->guide_text_str); 1534 eina_stringshare_del(sd->guide_text_str);
1535 evas_object_del(sd->entry); 1535 evas_object_del(sd->entry);
1536 if (sd->label) evas_object_del(sd->label); 1536 evas_object_del(sd->label);
1537 if (sd->guide_text) evas_object_del(sd->guide_text); 1537 evas_object_del(sd->guide_text);
1538 if (sd->end) evas_object_del(sd->end); 1538 evas_object_del(sd->end);
1539 1539
1540 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 1540 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
1541} 1541}
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index f9806aeae..6573472b3 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -829,9 +829,7 @@ _item_del_pre_hook(Elm_Object_Item *item)
829 ELM_POPUP_ITEM_CHECK_OR_RETURN(it); 829 ELM_POPUP_ITEM_CHECK_OR_RETURN(it);
830 ELM_POPUP_DATA_GET(WIDGET(it), sd); 830 ELM_POPUP_DATA_GET(WIDGET(it), sd);
831 831
832 if (it->icon) 832 evas_object_del(it->icon);
833 evas_object_del(it->icon);
834
835 eina_stringshare_del(it->label); 833 eina_stringshare_del(it->label);
836 sd->items = eina_list_remove(sd->items, it); 834 sd->items = eina_list_remove(sd->items, it);
837 if (!eina_list_count(sd->items)) 835 if (!eina_list_count(sd->items))
diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index 68dad7aeb..3fe5a1c74 100644
--- a/src/lib/elm_access.c
+++ b/src/lib/elm_access.c
@@ -210,7 +210,7 @@ _access_add_set(Elm_Access_Info *ac, int type)
210 { 210 {
211 if (!ai->func) 211 if (!ai->func)
212 { 212 {
213 if (ai->data) eina_stringshare_del(ai->data); 213 eina_stringshare_del(ai->data);
214 } 214 }
215 ai->func = NULL; 215 ai->func = NULL;
216 ai->data = NULL; 216 ai->data = NULL;
@@ -571,7 +571,7 @@ _elm_access_clear(Elm_Access_Info *ac)
571 { 571 {
572 if (!ai->func) 572 if (!ai->func)
573 { 573 {
574 if (ai->data) eina_stringshare_del(ai->data); 574 eina_stringshare_del(ai->data);
575 } 575 }
576 free(ai); 576 free(ai);
577 } 577 }
diff --git a/src/lib/elm_atspi_object.c b/src/lib/elm_atspi_object.c
index ab7979c28..612130a0c 100644
--- a/src/lib/elm_atspi_object.c
+++ b/src/lib/elm_atspi_object.c
@@ -212,8 +212,8 @@ _destructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
212{ 212{
213 Atspi_Object_Data *ad = _pd; 213 Atspi_Object_Data *ad = _pd;
214 214
215 if (ad->name) eina_stringshare_del(ad->name); 215 eina_stringshare_del(ad->name);
216 if (ad->description) eina_stringshare_del(ad->description); 216 eina_stringshare_del(ad->description);
217 217
218 eo_do_super(obj, ELM_ATSPI_CLASS, eo_destructor()); 218 eo_do_super(obj, ELM_ATSPI_CLASS, eo_destructor());
219} 219}
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c
index 2c5cc20da..bdd7f5130 100644
--- a/src/lib/elm_colorselector.c
+++ b/src/lib/elm_colorselector.c
@@ -1587,12 +1587,12 @@ _elm_colorselector_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1587 evas_event_callback_del_full(evas_object_evas_get(obj), EVAS_CALLBACK_CANVAS_FOCUS_OUT, _mouse_out_canvas, obj); 1587 evas_event_callback_del_full(evas_object_evas_get(obj), EVAS_CALLBACK_CANVAS_FOCUS_OUT, _mouse_out_canvas, obj);
1588 1588
1589 ecore_timer_del(sd->longpress_timer); 1589 ecore_timer_del(sd->longpress_timer);
1590 if (sd->palette_name) eina_stringshare_del(sd->palette_name); 1590 eina_stringshare_del(sd->palette_name);
1591 1591
1592#ifdef HAVE_ELEMENTARY_X 1592#ifdef HAVE_ELEMENTARY_X
1593 if (sd->grab.mouse_motion) ecore_event_handler_del(sd->grab.mouse_motion); 1593 ecore_event_handler_del(sd->grab.mouse_motion);
1594 if (sd->grab.mouse_up) ecore_event_handler_del(sd->grab.mouse_up); 1594 ecore_event_handler_del(sd->grab.mouse_up);
1595 if (sd->grab.key_up) ecore_event_handler_del(sd->grab.key_up); 1595 ecore_event_handler_del(sd->grab.key_up);
1596#endif 1596#endif
1597 1597
1598 _items_del(sd); 1598 _items_del(sd);
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 222e04a0e..87e35e37f 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -651,7 +651,7 @@ _elm_config_font_overlay_set(const char *text_class,
651 if (strcmp(efd->text_class, text_class)) 651 if (strcmp(efd->text_class, text_class))
652 continue; 652 continue;
653 653
654 if (efd->font) eina_stringshare_del(efd->font); 654 eina_stringshare_del(efd->font);
655 efd->font = eina_stringshare_add(font); 655 efd->font = eina_stringshare_add(font);
656 efd->size = size; 656 efd->size = size;
657 _elm_config->font_overlays = 657 _elm_config->font_overlays =
@@ -686,7 +686,7 @@ _elm_config_font_overlay_remove(const char *text_class)
686 _elm_config->font_overlays = 686 _elm_config->font_overlays =
687 eina_list_remove_list(_elm_config->font_overlays, l); 687 eina_list_remove_list(_elm_config->font_overlays, l);
688 eina_stringshare_del(efd->text_class); 688 eina_stringshare_del(efd->text_class);
689 if (efd->font) eina_stringshare_del(efd->font); 689 eina_stringshare_del(efd->font);
690 free(efd); 690 free(efd);
691 691
692 return; 692 return;
@@ -968,25 +968,25 @@ _config_free(Elm_Config *cfg)
968 { 968 {
969 eina_stringshare_del(fontdir); 969 eina_stringshare_del(fontdir);
970 } 970 }
971 if (cfg->engine) eina_stringshare_del(cfg->engine); 971 eina_stringshare_del(cfg->engine);
972 EINA_LIST_FREE(cfg->font_overlays, fo) 972 EINA_LIST_FREE(cfg->font_overlays, fo)
973 { 973 {
974 if (fo->text_class) eina_stringshare_del(fo->text_class); 974 eina_stringshare_del(fo->text_class);
975 if (fo->font) eina_stringshare_del(fo->font); 975 eina_stringshare_del(fo->font);
976 free(fo); 976 free(fo);
977 } 977 }
978 EINA_LIST_FREE(cfg->color_palette, palette) 978 EINA_LIST_FREE(cfg->color_palette, palette)
979 { 979 {
980 if (palette->palette_name) eina_stringshare_del(palette->palette_name); 980 eina_stringshare_del(palette->palette_name);
981 EINA_LIST_FREE(palette->color_list, color) free(color); 981 EINA_LIST_FREE(palette->color_list, color) free(color);
982 free(palette); 982 free(palette);
983 } 983 }
984 if (cfg->theme) eina_stringshare_del(cfg->theme); 984 eina_stringshare_del(cfg->theme);
985 if (cfg->modules) eina_stringshare_del(cfg->modules); 985 eina_stringshare_del(cfg->modules);
986 if (cfg->indicator_service_0) eina_stringshare_del(cfg->indicator_service_0); 986 eina_stringshare_del(cfg->indicator_service_0);
987 if (cfg->indicator_service_90) eina_stringshare_del(cfg->indicator_service_90); 987 eina_stringshare_del(cfg->indicator_service_90);
988 if (cfg->indicator_service_180) eina_stringshare_del(cfg->indicator_service_180); 988 eina_stringshare_del(cfg->indicator_service_180);
989 if (cfg->indicator_service_270) eina_stringshare_del(cfg->indicator_service_270); 989 eina_stringshare_del(cfg->indicator_service_270);
990 free(cfg); 990 free(cfg);
991} 991}
992 992
@@ -1436,7 +1436,7 @@ _config_update(void)
1436 } 1436 }
1437 if (s) 1437 if (s)
1438 { 1438 {
1439 if (_elm_config->modules) eina_stringshare_del(_elm_config->modules); 1439 eina_stringshare_del(_elm_config->modules);
1440 _elm_config->modules = s; 1440 _elm_config->modules = s;
1441 } 1441 }
1442 IFCFGEND; 1442 IFCFGEND;
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 7fa3b135f..c8774c9cc 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -355,8 +355,8 @@ _filter_free(Elm_Entry_Markup_Filter *tf)
355 355
356 if (as) 356 if (as)
357 { 357 {
358 if (as->accepted) eina_stringshare_del(as->accepted); 358 eina_stringshare_del(as->accepted);
359 if (as->rejected) eina_stringshare_del(as->rejected); 359 eina_stringshare_del(as->rejected);
360 360
361 free(as); 361 free(as);
362 } 362 }
@@ -1867,8 +1867,7 @@ _entry_selection_cleared_signal_cb(void *data,
1867 (data, ELM_SEL_TYPE_PRIMARY, ELM_SEL_FORMAT_MARKUP, 1867 (data, ELM_SEL_TYPE_PRIMARY, ELM_SEL_FORMAT_MARKUP,
1868 sd->cut_sel, eina_stringshare_strlen(sd->cut_sel)); 1868 sd->cut_sel, eina_stringshare_strlen(sd->cut_sel));
1869 1869
1870 eina_stringshare_del(sd->cut_sel); 1870 ELM_SAFE_FREE(sd->cut_sel, eina_stringshare_del);
1871 sd->cut_sel = NULL;
1872 } 1871 }
1873 else 1872 else
1874 { 1873 {
@@ -3433,8 +3432,8 @@ _elm_entry_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
3433 _filter_free(tf); 3432 _filter_free(tf);
3434 } 3433 }
3435 ELM_SAFE_FREE(sd->delay_write, ecore_timer_del); 3434 ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
3436 if (sd->input_panel_imdata) free(sd->input_panel_imdata); 3435 free(sd->input_panel_imdata);
3437 if (sd->anchor_hover.hover_style) eina_stringshare_del(sd->anchor_hover.hover_style); 3436 eina_stringshare_del(sd->anchor_hover.hover_style);
3438 3437
3439 evas_event_thaw(evas_object_evas_get(obj)); 3438 evas_event_thaw(evas_object_evas_get(obj));
3440 evas_event_thaw_eval(evas_object_evas_get(obj)); 3439 evas_event_thaw_eval(evas_object_evas_get(obj));
diff --git a/src/lib/elm_font.c b/src/lib/elm_font.c
index 571f1836a..d95c8157f 100644
--- a/src/lib/elm_font.c
+++ b/src/lib/elm_font.c
@@ -108,9 +108,9 @@ _elm_font_properties_free(Elm_Font_Properties *efp)
108 const char *str; 108 const char *str;
109 109
110 EINA_LIST_FREE(efp->styles, str) 110 EINA_LIST_FREE(efp->styles, str)
111 if (str) eina_stringshare_del(str); 111 eina_stringshare_del(str);
112 112
113 if (efp->name) eina_stringshare_del(efp->name); 113 eina_stringshare_del(efp->name);
114 free(efp); 114 free(efp);
115} 115}
116 116
@@ -147,8 +147,8 @@ elm_font_properties_free(Elm_Font_Properties *efp)
147 147
148 EINA_SAFETY_ON_NULL_RETURN(efp); 148 EINA_SAFETY_ON_NULL_RETURN(efp);
149 EINA_LIST_FREE(efp->styles, str) 149 EINA_LIST_FREE(efp->styles, str)
150 if (str) eina_stringshare_del(str); 150 eina_stringshare_del(str);
151 if (efp->name) eina_stringshare_del(efp->name); 151 eina_stringshare_del(efp->name);
152 free(efp); 152 free(efp);
153} 153}
154 154
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 3f15d67cf..a82454ee2 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -1252,8 +1252,8 @@ _item_cache_clean(Elm_Genlist_Smart_Data *sd)
1252 sd->item_cache = eina_inlist_remove 1252 sd->item_cache = eina_inlist_remove
1253 (sd->item_cache, sd->item_cache->last); 1253 (sd->item_cache, sd->item_cache->last);
1254 sd->item_cache_count--; 1254 sd->item_cache_count--;
1255 if (itc->spacer) evas_object_del(itc->spacer); 1255 evas_object_del(itc->spacer);
1256 if (itc->base_view) evas_object_del(itc->base_view); 1256 evas_object_del(itc->base_view);
1257 eina_stringshare_del(itc->item_style); 1257 eina_stringshare_del(itc->item_style);
1258 free(itc); 1258 free(itc);
1259 } 1259 }
@@ -1265,8 +1265,8 @@ _item_cache_clean(Elm_Genlist_Smart_Data *sd)
1265static void 1265static void
1266_item_cache_free(Item_Cache *itc) 1266_item_cache_free(Item_Cache *itc)
1267{ 1267{
1268 if (itc->spacer) evas_object_del(itc->spacer); 1268 evas_object_del(itc->spacer);
1269 if (itc->base_view) evas_object_del(itc->base_view); 1269 evas_object_del(itc->base_view);
1270 eina_stringshare_del(itc->item_style); 1270 eina_stringshare_del(itc->item_style);
1271 free(itc); 1271 free(itc);
1272} 1272}
diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c
index 3f6929eb3..6136e8311 100644
--- a/src/lib/elm_icon.c
+++ b/src/lib/elm_icon.c
@@ -591,7 +591,7 @@ _elm_icon_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
591{ 591{
592 Elm_Icon_Smart_Data *sd = _pd; 592 Elm_Icon_Smart_Data *sd = _pd;
593 593
594 if (sd->stdicon) eina_stringshare_del(sd->stdicon); 594 eina_stringshare_del(sd->stdicon);
595 595
596 if (sd->thumb.request) 596 if (sd->thumb.request)
597 { 597 {
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index e4e59d1e5..dd68e834e 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -948,8 +948,7 @@ _elm_image_smart_download_done(void *data, Elm_Url *url EINA_UNUSED, Eina_Binbuf
948 } 948 }
949 949
950 sd->remote = NULL; 950 sd->remote = NULL;
951 eina_stringshare_del(sd->key); 951 ELM_SAFE_FREE(sd->key, eina_stringshare_del);
952 sd->key = NULL;
953} 952}
954 953
955static void 954static void
@@ -962,8 +961,7 @@ _elm_image_smart_download_cancel(void *data, Elm_Url *url EINA_UNUSED, int error
962 evas_object_smart_callback_call(obj, SIG_DOWNLOAD_ERROR, &err); 961 evas_object_smart_callback_call(obj, SIG_DOWNLOAD_ERROR, &err);
963 962
964 sd->remote = NULL; 963 sd->remote = NULL;
965 eina_stringshare_del(sd->key); 964 ELM_SAFE_FREE(sd->key, eina_stringshare_del);
966 sd->key = NULL;
967} 965}
968 966
969static void 967static void
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index d9959cf85..c4da84f1a 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -174,19 +174,13 @@ static void
174_prefix_shutdown(void) 174_prefix_shutdown(void)
175{ 175{
176 if (app_pfx) eina_prefix_free(app_pfx); 176 if (app_pfx) eina_prefix_free(app_pfx);
177 if (app_domain) eina_stringshare_del(app_domain); 177 ELM_SAFE_FREE(app_domain, eina_stringshare_del);
178 if (app_checkfile) eina_stringshare_del(app_checkfile); 178 ELM_SAFE_FREE(app_checkfile, eina_stringshare_del);
179 if (app_compile_bin_dir) eina_stringshare_del(app_compile_bin_dir); 179 ELM_SAFE_FREE(app_compile_bin_dir, eina_stringshare_del);
180 if (app_compile_lib_dir) eina_stringshare_del(app_compile_lib_dir); 180 ELM_SAFE_FREE(app_compile_lib_dir, eina_stringshare_del);
181 if (app_compile_data_dir) eina_stringshare_del(app_compile_data_dir); 181 ELM_SAFE_FREE(app_compile_data_dir, eina_stringshare_del);
182 if (app_compile_locale_dir) eina_stringshare_del(app_compile_locale_dir); 182 ELM_SAFE_FREE(app_compile_locale_dir, eina_stringshare_del);
183 app_mainfunc = NULL; 183 app_mainfunc = NULL;
184 app_domain = NULL;
185 app_checkfile = NULL;
186 app_compile_bin_dir = NULL;
187 app_compile_lib_dir = NULL;
188 app_compile_data_dir = NULL;
189 app_compile_locale_dir = NULL;
190 app_prefix_dir = NULL; 184 app_prefix_dir = NULL;
191 app_bin_dir = NULL; 185 app_bin_dir = NULL;
192 app_lib_dir = NULL; 186 app_lib_dir = NULL;
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 6625eb85d..8e681d436 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -723,10 +723,10 @@ _grid_item_free(Grid_Item *gi)
723 _grid_item_unload(gi); 723 _grid_item_unload(gi);
724 if (gi->g && gi->g->grid) 724 if (gi->g && gi->g->grid)
725 eina_matrixsparse_data_idx_set(gi->g->grid, gi->y, gi->x, NULL); 725 eina_matrixsparse_data_idx_set(gi->g->grid, gi->y, gi->x, NULL);
726 if (gi->url) eina_stringshare_del(gi->url); 726 eina_stringshare_del(gi->url);
727 if (gi->file_have) ecore_file_remove(gi->file); 727 if (gi->file_have) ecore_file_remove(gi->file);
728 if (gi->file) eina_stringshare_del(gi->file); 728 eina_stringshare_del(gi->file);
729 if (gi->img) evas_object_del(gi->img); 729 evas_object_del(gi->img);
730 730
731 free(gi); 731 free(gi);
732} 732}
@@ -2077,7 +2077,7 @@ _overlay_route_free(Overlay_Route *route)
2077 2077
2078 EINA_LIST_FREE(route->nodes, n) 2078 EINA_LIST_FREE(route->nodes, n)
2079 { 2079 {
2080 if (n->pos.address) eina_stringshare_del(n->pos.address); 2080 eina_stringshare_del(n->pos.address);
2081 free(n); 2081 free(n);
2082 } 2082 }
2083 2083
@@ -4848,13 +4848,13 @@ elm_map_route_del(Elm_Map_Route *route)
4848 4848
4849 EINA_LIST_FREE(route->waypoint, w) 4849 EINA_LIST_FREE(route->waypoint, w)
4850 { 4850 {
4851 if (w->point) eina_stringshare_del(w->point); 4851 eina_stringshare_del(w->point);
4852 free(w); 4852 free(w);
4853 } 4853 }
4854 4854
4855 EINA_LIST_FREE(route->nodes, n) 4855 EINA_LIST_FREE(route->nodes, n)
4856 { 4856 {
4857 if (n->pos.address) eina_stringshare_del(n->pos.address); 4857 eina_stringshare_del(n->pos.address);
4858 free(n); 4858 free(n);
4859 } 4859 }
4860 4860
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index d0ea733ee..7fa0d200c 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -48,10 +48,10 @@ _item_del(Elm_Menu_Item *item)
48 EINA_LIST_FREE(item->submenu.items, child) 48 EINA_LIST_FREE(item->submenu.items, child)
49 _item_del(child); 49 _item_del(child);
50 50
51 if (item->label) eina_stringshare_del(item->label); 51 eina_stringshare_del(item->label);
52 if (item->submenu.hv) evas_object_del(item->submenu.hv); 52 evas_object_del(item->submenu.hv);
53 if (item->submenu.location) evas_object_del(item->submenu.location); 53 evas_object_del(item->submenu.location);
54 if (item->icon_str) eina_stringshare_del(item->icon_str); 54 eina_stringshare_del(item->icon_str);
55 55
56 elm_widget_item_free(item); 56 elm_widget_item_free(item);
57} 57}
@@ -906,10 +906,10 @@ _item_del_pre_hook(Elm_Object_Item *it)
906 ELM_MENU_DATA_GET(WIDGET(item), sd); 906 ELM_MENU_DATA_GET(WIDGET(item), sd);
907 907
908 elm_menu_item_subitems_clear(it); 908 elm_menu_item_subitems_clear(it);
909 if (item->label) eina_stringshare_del(item->label); 909 eina_stringshare_del(item->label);
910 if (item->content) evas_object_del(item->content); 910 evas_object_del(item->content);
911 if (item->submenu.hv) evas_object_del(item->submenu.hv); 911 evas_object_del(item->submenu.hv);
912 if (item->submenu.location) evas_object_del(item->submenu.location); 912 evas_object_del(item->submenu.location);
913 913
914 if (item->parent) 914 if (item->parent)
915 item->parent->submenu.items = 915 item->parent->submenu.items =
diff --git a/src/lib/elm_progressbar.c b/src/lib/elm_progressbar.c
index 3bb6f7709..c38287529 100644
--- a/src/lib/elm_progressbar.c
+++ b/src/lib/elm_progressbar.c
@@ -306,7 +306,7 @@ _elm_progressbar_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
306 Elm_Progressbar_Smart_Data *sd = _pd; 306 Elm_Progressbar_Smart_Data *sd = _pd;
307 Elm_Progress_Status *progress_obj; 307 Elm_Progress_Status *progress_obj;
308 308
309 if (sd->units) eina_stringshare_del(sd->units); 309 eina_stringshare_del(sd->units);
310 if (sd->progress_status) 310 if (sd->progress_status)
311 { 311 {
312 EINA_LIST_FREE(sd->progress_status, progress_obj) 312 EINA_LIST_FREE(sd->progress_status, progress_obj)
diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index 0f6c0a904..b2f79c6d6 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -67,8 +67,8 @@ _item_free(Elm_Segment_Item *it)
67 if (sd->selected_item == it) sd->selected_item = NULL; 67 if (sd->selected_item == it) sd->selected_item = NULL;
68 if (sd->items) sd->items = eina_list_remove(sd->items, it); 68 if (sd->items) sd->items = eina_list_remove(sd->items, it);
69 69
70 if (it->icon) evas_object_del(it->icon); 70 evas_object_del(it->icon);
71 if (it->label) eina_stringshare_del(it->label); 71 eina_stringshare_del(it->label);
72} 72}
73 73
74static void 74static void
diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c
index 533c5405d..3119b0e92 100644
--- a/src/lib/elm_thumb.c
+++ b/src/lib/elm_thumb.c
@@ -287,14 +287,9 @@ _thumb_finish(Elm_Thumb_Smart_Data *sd,
287 EINA_LIST_FREE(retry, sd) 287 EINA_LIST_FREE(retry, sd)
288 { 288 {
289 eo_data_unref(sd->obj, sd); 289 eo_data_unref(sd->obj, sd);
290 eina_stringshare_del(sd->thumb.thumb_path); 290 ELM_SAFE_FREE(sd->thumb.thumb_path, eina_stringshare_del);
291 sd->thumb.thumb_path = NULL; 291 ELM_SAFE_FREE(sd->thumb.thumb_key, eina_stringshare_del);
292 292 ELM_SAFE_FREE(sd->view, evas_object_del);
293 eina_stringshare_del(sd->thumb.thumb_key);
294 sd->thumb.thumb_key = NULL;
295
296 evas_object_del(sd->view);
297 sd->view = NULL;
298 293
299 wd = eo_data_scope_get(sd->obj, ELM_OBJ_WIDGET_CLASS); 294 wd = eo_data_scope_get(sd->obj, ELM_OBJ_WIDGET_CLASS);
300 edje_object_signal_emit 295 edje_object_signal_emit
@@ -580,19 +575,14 @@ _elm_thumb_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
580 (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded, 575 (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded,
581 sd); 576 sd);
582 577
583 if (sd->view) 578 ELM_SAFE_FREE(sd->view, evas_object_del);
584 {
585 evas_object_del(sd->view);
586 sd->view = NULL;
587 }
588
589 eina_stringshare_del(sd->thumb.thumb_path); 579 eina_stringshare_del(sd->thumb.thumb_path);
590 eina_stringshare_del(sd->thumb.thumb_key); 580 eina_stringshare_del(sd->thumb.thumb_key);
591 581
592 eina_stringshare_del(sd->file); 582 eina_stringshare_del(sd->file);
593 eina_stringshare_del(sd->key); 583 eina_stringshare_del(sd->key);
594 584
595 if (sd->eeh) ecore_event_handler_del(sd->eeh); 585 ecore_event_handler_del(sd->eeh);
596 586
597 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 587 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
598} 588}
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 086361887..750c972a1 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -328,10 +328,10 @@ _elm_widget_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
328 EINA_LIST_FREE(sd->event_cb, ecb) 328 EINA_LIST_FREE(sd->event_cb, ecb)
329 free(ecb); 329 free(ecb);
330 330
331 if (sd->style) eina_stringshare_del(sd->style); 331 eina_stringshare_del(sd->style);
332 if (sd->theme) elm_theme_free(sd->theme); 332 if (sd->theme) elm_theme_free(sd->theme);
333 _if_focused_revert(obj, EINA_TRUE); 333 _if_focused_revert(obj, EINA_TRUE);
334 if (sd->access_info) eina_stringshare_del(sd->access_info); 334 eina_stringshare_del(sd->access_info);
335 evas_object_smart_data_set(obj, NULL); 335 evas_object_smart_data_set(obj, NULL);
336} 336}
337 337
@@ -4170,7 +4170,7 @@ _elm_widget_access_info_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4170{ 4170{
4171 const char *txt = va_arg(*list, const char *); 4171 const char *txt = va_arg(*list, const char *);
4172 Elm_Widget_Smart_Data *sd = _pd; 4172 Elm_Widget_Smart_Data *sd = _pd;
4173 if (sd->access_info) eina_stringshare_del(sd->access_info); 4173 eina_stringshare_del(sd->access_info);
4174 if (!txt) sd->access_info = NULL; 4174 if (!txt) sd->access_info = NULL;
4175 else sd->access_info = eina_stringshare_add(txt); 4175 else sd->access_info = eina_stringshare_add(txt);
4176} 4176}
@@ -5066,8 +5066,7 @@ _elm_widget_item_free(Elm_Widget_Item *item)
5066 if (item->view) 5066 if (item->view)
5067 evas_object_del(item->view); 5067 evas_object_del(item->view);
5068 5068
5069 if (item->access_info) 5069 eina_stringshare_del(item->access_info);
5070 eina_stringshare_del(item->access_info);
5071 5070
5072 while (item->signals) 5071 while (item->signals)
5073 _elm_widget_item_signal_callback_list_get(item, item->signals); 5072 _elm_widget_item_signal_callback_list_get(item, item->signals);
@@ -6079,7 +6078,7 @@ _elm_widget_item_access_info_set(Elm_Widget_Item *item,
6079 const char *txt) 6078 const char *txt)
6080{ 6079{
6081 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); 6080 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
6082 if (item->access_info) eina_stringshare_del(item->access_info); 6081 eina_stringshare_del(item->access_info);
6083 if (!txt) item->access_info = NULL; 6082 if (!txt) item->access_info = NULL;
6084 else item->access_info = eina_stringshare_add(txt); 6083 else item->access_info = eina_stringshare_add(txt);
6085} 6084}
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 2e493242b..993f4cdb6 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1494,10 +1494,10 @@ _elm_win_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1494 _elm_win_focus_highlight_shutdown(sd); 1494 _elm_win_focus_highlight_shutdown(sd);
1495 eina_stringshare_del(sd->focus_highlight.style); 1495 eina_stringshare_del(sd->focus_highlight.style);
1496 1496
1497 if (sd->title) eina_stringshare_del(sd->title); 1497 eina_stringshare_del(sd->title);
1498 if (sd->icon_name) eina_stringshare_del(sd->icon_name); 1498 eina_stringshare_del(sd->icon_name);
1499 if (sd->role) eina_stringshare_del(sd->role); 1499 eina_stringshare_del(sd->role);
1500 if (sd->icon) evas_object_del(sd->icon); 1500 evas_object_del(sd->icon);
1501 1501
1502 if (sd->main_menu) evas_object_del(sd->main_menu); 1502 if (sd->main_menu) evas_object_del(sd->main_menu);
1503 1503