summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-22 10:38:55 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-22 10:54:52 +0900
commit907fc5c590751a304f1d6bc5a247f12cc64e48ca (patch)
tree344cbbcf1007e78f95e9f816559c828ca9b4ddfd
parent647dc0432b2de4e342e39c55ae538e46384cc011 (diff)
elm: Removed unnecessary null check for evas_object_del.
-rw-r--r--src/lib/elc_ctxpopup.c14
-rw-r--r--src/lib/elc_fileselector.c6
-rw-r--r--src/lib/elc_hoversel.c3
-rw-r--r--src/lib/elc_naviframe.c8
-rw-r--r--src/lib/elc_player.c3
-rw-r--r--src/lib/elc_popup.c18
-rw-r--r--src/lib/elm_bg.c6
-rw-r--r--src/lib/elm_clock.c14
-rw-r--r--src/lib/elm_colorselector.c23
-rw-r--r--src/lib/elm_diskselector.c6
-rw-r--r--src/lib/elm_entry.c9
-rw-r--r--src/lib/elm_factory.c2
-rw-r--r--src/lib/elm_flip.c2
-rw-r--r--src/lib/elm_genlist.c11
-rw-r--r--src/lib/elm_hover.c8
-rw-r--r--src/lib/elm_icon.c6
-rw-r--r--src/lib/elm_image.c2
-rw-r--r--src/lib/elm_index.c21
-rw-r--r--src/lib/elm_interface_scrollable.c6
-rw-r--r--src/lib/elm_list.c6
-rw-r--r--src/lib/elm_map.c26
-rw-r--r--src/lib/elm_mapbuf.c2
-rw-r--r--src/lib/elm_menu.c7
-rw-r--r--src/lib/elm_notify.c2
-rw-r--r--src/lib/elm_photocam.c9
-rw-r--r--src/lib/elm_prefs.c10
-rw-r--r--src/lib/elm_scroller.c2
-rw-r--r--src/lib/elm_segment_control.c2
-rw-r--r--src/lib/elm_slideshow.c3
-rw-r--r--src/lib/elm_thumb.c3
-rw-r--r--src/lib/elm_toolbar.c23
-rw-r--r--src/lib/elm_widget.c3
-rw-r--r--src/lib/elm_win.c18
-rw-r--r--src/lib/els_cursor.c12
-rw-r--r--src/lib/els_tooltip.c3
35 files changed, 98 insertions, 201 deletions
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 4900765aa..ee756f657 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -786,7 +786,7 @@ _elm_ctxpopup_smart_content_set(Eo *obj, void *_pd, va_list *list)
786 786
787 if (content == sd->content) goto end; 787 if (content == sd->content) goto end;
788 788
789 if (sd->content) evas_object_del(sd->content); 789 evas_object_del(sd->content);
790 if (sd->content == sd->list) sd->list = NULL; 790 if (sd->content == sd->list) sd->list = NULL;
791 791
792 evas_object_size_hint_weight_set 792 evas_object_size_hint_weight_set
@@ -1040,10 +1040,7 @@ _list_resize_cb(void *data,
1040static void 1040static void
1041_list_del(Elm_Ctxpopup_Smart_Data *sd) 1041_list_del(Elm_Ctxpopup_Smart_Data *sd)
1042{ 1042{
1043 if (!sd->list) return; 1043 ELM_SAFE_FREE(sd->list, evas_object_del);
1044
1045 evas_object_del(sd->list);
1046 sd->list = NULL;
1047} 1044}
1048 1045
1049static Eina_Bool 1046static Eina_Bool
@@ -1158,11 +1155,8 @@ _elm_ctxpopup_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1158 _parent_detach(obj); 1155 _parent_detach(obj);
1159 1156
1160 elm_ctxpopup_clear(obj); 1157 elm_ctxpopup_clear(obj);
1161 evas_object_del(sd->arrow); 1158 ELM_SAFE_FREE(sd->arrow, evas_object_del); /* stops _sizing_eval() from going on on deletion */
1162 sd->arrow = NULL; /* stops _sizing_eval() from going on on deletion */ 1159 ELM_SAFE_FREE(sd->bg, evas_object_del);
1163
1164 evas_object_del(sd->bg);
1165 sd->bg = NULL;
1166 1160
1167 EINA_LIST_FREE(sd->items, it) 1161 EINA_LIST_FREE(sd->items, it)
1168 elm_widget_item_free(it); 1162 elm_widget_item_free(it);
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 49bfbd399..dcd9ad796 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1583,10 +1583,8 @@ _buttons_ok_cancel_set(Eo *obj, void *_pd, va_list *list)
1583 } 1583 }
1584 else if (!visible) 1584 else if (!visible)
1585 { 1585 {
1586 evas_object_del(sd->cancel_button); 1586 ELM_SAFE_FREE(sd->cancel_button, evas_object_del);
1587 sd->cancel_button = NULL; 1587 ELM_SAFE_FREE(sd->ok_button, evas_object_del);
1588 evas_object_del(sd->ok_button);
1589 sd->ok_button = NULL;
1590 } 1588 }
1591} 1589}
1592 1590
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index a472122bf..d0321a99f 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -449,8 +449,7 @@ _hover_end(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
449 { 449 {
450 VIEW(it) = NULL; 450 VIEW(it) = NULL;
451 } 451 }
452 evas_object_del(sd->hover); 452 ELM_SAFE_FREE(sd->hover, evas_object_del);
453 sd->hover = NULL;
454 453
455 evas_object_smart_callback_call(obj, SIG_DISMISSED, NULL); 454 evas_object_smart_callback_call(obj, SIG_DISMISSED, NULL);
456} 455}
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 6143f2ae0..7441a0245 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -548,7 +548,7 @@ _item_content_set(Elm_Naviframe_Item *it,
548{ 548{
549 if (it->content == content) return; 549 if (it->content == content) return;
550 550
551 if (it->content) evas_object_del(it->content); 551 evas_object_del(it->content);
552 it->content = content; 552 it->content = content;
553 553
554 if (!content) return; 554 if (!content) return;
@@ -565,7 +565,7 @@ _item_title_prev_btn_set(Elm_Naviframe_Item *it,
565 Evas_Object *btn) 565 Evas_Object *btn)
566{ 566{
567 if (it->title_prev_btn == btn) return; 567 if (it->title_prev_btn == btn) return;
568 if (it->title_prev_btn) evas_object_del(it->title_prev_btn); 568 evas_object_del(it->title_prev_btn);
569 it->title_prev_btn = btn; 569 it->title_prev_btn = btn;
570 if (!btn) return; 570 if (!btn) return;
571 571
@@ -582,7 +582,7 @@ _item_title_next_btn_set(Elm_Naviframe_Item *it,
582 Evas_Object *btn) 582 Evas_Object *btn)
583{ 583{
584 if (it->title_next_btn == btn) return; 584 if (it->title_next_btn == btn) return;
585 if (it->title_next_btn) evas_object_del(it->title_next_btn); 585 evas_object_del(it->title_next_btn);
586 it->title_next_btn = btn; 586 it->title_next_btn = btn;
587 if (!btn) return; 587 if (!btn) return;
588 588
@@ -598,7 +598,7 @@ _item_title_icon_set(Elm_Naviframe_Item *it,
598 Evas_Object *icon) 598 Evas_Object *icon)
599{ 599{
600 if (it->title_icon == icon) return; 600 if (it->title_icon == icon) return;
601 if (it->title_icon) evas_object_del(it->title_icon); 601 evas_object_del(it->title_icon);
602 it->title_icon = icon; 602 it->title_icon = icon;
603 if (!icon) return; 603 if (!icon) return;
604 604
diff --git a/src/lib/elc_player.c b/src/lib/elc_player.c
index 0d39dfa49..2b6eff387 100644
--- a/src/lib/elc_player.c
+++ b/src/lib/elc_player.c
@@ -563,8 +563,7 @@ _elm_player_smart_content_set(Eo *obj, void *_pd, va_list *list)
563 if (!_elm_video_check(content)) return; 563 if (!_elm_video_check(content)) return;
564 if (sd->video == content) goto end; 564 if (sd->video == content) goto end;
565 565
566 if (sd->video) evas_object_del(sd->video); 566 evas_object_del(sd->video);
567
568 sd->video = content; 567 sd->video = content;
569 568
570 if (!content) goto end; 569 if (!content) goto end;
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 6573472b3..640134c09 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -188,11 +188,10 @@ _list_del(Elm_Popup_Smart_Data *sd)
188 evas_object_event_callback_del 188 evas_object_event_callback_del
189 (sd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb); 189 (sd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb);
190 190
191 evas_object_del(sd->tbl); 191 ELM_SAFE_FREE(sd->tbl, evas_object_del);
192 sd->scr = NULL; 192 sd->scr = NULL;
193 sd->box = NULL; 193 sd->box = NULL;
194 sd->spacer = NULL; 194 sd->spacer = NULL;
195 sd->tbl = NULL;
196} 195}
197 196
198static void 197static void
@@ -229,8 +228,7 @@ _elm_popup_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
229 if (sd->buttons[i]) 228 if (sd->buttons[i])
230 { 229 {
231 evas_object_del(sd->buttons[i]->btn); 230 evas_object_del(sd->buttons[i]->btn);
232 free(sd->buttons[i]); 231 ELM_SAFE_FREE(sd->buttons[i], free);
233 sd->buttons[i] = NULL;
234 } 232 }
235 } 233 }
236 if (sd->items) 234 if (sd->items)
@@ -580,8 +578,7 @@ _button_remove(Evas_Object *obj,
580 if (!sd->last_button_number) 578 if (!sd->last_button_number)
581 { 579 {
582 _visuals_set(obj); 580 _visuals_set(obj);
583 evas_object_del(sd->action_area); 581 ELM_SAFE_FREE(sd->action_area, evas_object_del);
584 sd->action_area = NULL;
585 edje_object_message_signal_process(wd->resize_obj); 582 edje_object_message_signal_process(wd->resize_obj);
586 } 583 }
587 else 584 else
@@ -728,9 +725,7 @@ _item_icon_set(Elm_Popup_Item *it,
728{ 725{
729 if (it->icon == icon) return; 726 if (it->icon == icon) return;
730 727
731 if (it->icon) 728 evas_object_del(it->icon);
732 evas_object_del(it->icon);
733
734 it->icon = icon; 729 it->icon = icon;
735 if (it->icon) 730 if (it->icon)
736 { 731 {
@@ -1046,7 +1041,7 @@ _title_icon_set(Evas_Object *obj,
1046 1041
1047 if (sd->title_icon == icon) return EINA_TRUE; 1042 if (sd->title_icon == icon) return EINA_TRUE;
1048 title_visibility_old = (sd->title_text) || (sd->title_icon); 1043 title_visibility_old = (sd->title_text) || (sd->title_icon);
1049 if (sd->title_icon) evas_object_del(sd->title_icon); 1044 evas_object_del(sd->title_icon);
1050 1045
1051 sd->title_icon = icon; 1046 sd->title_icon = icon;
1052 title_visibility_current = (sd->title_text) || (sd->title_icon); 1047 title_visibility_current = (sd->title_text) || (sd->title_icon);
@@ -1912,8 +1907,7 @@ _item_append(Eo *obj, void *_pd, va_list *list)
1912 { 1907 {
1913 prev_content = elm_layout_content_get 1908 prev_content = elm_layout_content_get
1914 (sd->content_area, CONTENT_PART); 1909 (sd->content_area, CONTENT_PART);
1915 if (prev_content) 1910 evas_object_del(prev_content);
1916 evas_object_del(prev_content);
1917 } 1911 }
1918 1912
1919 //The first item is appended. 1913 //The first item is appended.
diff --git a/src/lib/elm_bg.c b/src/lib/elm_bg.c
index 3c404517b..ef8792d66 100644
--- a/src/lib/elm_bg.c
+++ b/src/lib/elm_bg.c
@@ -177,11 +177,7 @@ _file_set(Eo *obj, void *_pd, va_list *list)
177 const char *p; 177 const char *p;
178 Eina_Bool int_ret; 178 Eina_Bool int_ret;
179 179
180 if (sd->img) 180 ELM_SAFE_FREE(sd->img, evas_object_del);
181 {
182 evas_object_del(sd->img);
183 sd->img = NULL;
184 }
185 if (!file) 181 if (!file)
186 { 182 {
187 ELM_SAFE_FREE(sd->file, eina_stringshare_del); 183 ELM_SAFE_FREE(sd->file, eina_stringshare_del);
diff --git a/src/lib/elm_clock.c b/src/lib/elm_clock.c
index 51b2b4fd8..c63c7e030 100644
--- a/src/lib/elm_clock.c
+++ b/src/lib/elm_clock.c
@@ -352,18 +352,8 @@ _time_update(Evas_Object *obj)
352 Evas_Coord mw, mh; 352 Evas_Coord mw, mh;
353 353
354 for (i = 0; i < 6; i++) 354 for (i = 0; i < 6; i++)
355 { 355 ELM_SAFE_FREE(sd->digit[i], evas_object_del);
356 if (sd->digit[i]) 356 ELM_SAFE_FREE(sd->am_pm_obj, evas_object_del);
357 {
358 evas_object_del(sd->digit[i]);
359 sd->digit[i] = NULL;
360 }
361 }
362 if (sd->am_pm_obj)
363 {
364 evas_object_del(sd->am_pm_obj);
365 sd->am_pm_obj = NULL;
366 }
367 357
368 if ((sd->seconds) && (sd->am_pm)) 358 if ((sd->seconds) && (sd->am_pm))
369 { 359 {
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c
index bdd7f5130..9efb49538 100644
--- a/src/lib/elm_colorselector.c
+++ b/src/lib/elm_colorselector.c
@@ -1113,23 +1113,14 @@ _elm_colorselector_smart_theme(Eo *obj, void *_pd, va_list *list)
1113 { 1113 {
1114 if (sd->cb_data[i]) 1114 if (sd->cb_data[i])
1115 { 1115 {
1116 evas_object_del(sd->cb_data[i]->colorbar); 1116 ELM_SAFE_FREE(sd->cb_data[i]->colorbar, evas_object_del);
1117 sd->cb_data[i]->colorbar = NULL; 1117 ELM_SAFE_FREE(sd->cb_data[i]->bar, evas_object_del);
1118 evas_object_del(sd->cb_data[i]->bar); 1118 ELM_SAFE_FREE(sd->cb_data[i]->lbt, evas_object_del);
1119 sd->cb_data[i]->bar = NULL; 1119 ELM_SAFE_FREE(sd->cb_data[i]->rbt, evas_object_del);
1120 evas_object_del(sd->cb_data[i]->lbt);
1121 sd->cb_data[i]->lbt = NULL;
1122 evas_object_del(sd->cb_data[i]->rbt);
1123 sd->cb_data[i]->rbt = NULL;
1124 if (i != 0) 1120 if (i != 0)
1125 { 1121 ELM_SAFE_FREE(sd->cb_data[i]->bg_rect, evas_object_del);
1126 evas_object_del(sd->cb_data[i]->bg_rect); 1122 ELM_SAFE_FREE(sd->cb_data[i]->arrow, evas_object_del);
1127 sd->cb_data[i]->bg_rect = NULL; 1123 ELM_SAFE_FREE(sd->cb_data[i]->touch_area, evas_object_del);
1128 }
1129 evas_object_del(sd->cb_data[i]->arrow);
1130 sd->cb_data[i]->arrow = NULL;
1131 evas_object_del(sd->cb_data[i]->touch_area);
1132 sd->cb_data[i]->touch_area = NULL;
1133 } 1124 }
1134 } 1125 }
1135 1126
diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c
index 077ef43cc..04b41b1d0 100644
--- a/src/lib/elm_diskselector.c
+++ b/src/lib/elm_diskselector.c
@@ -333,9 +333,7 @@ _item_del(Elm_Diskselector_Item *item)
333 ELM_DISKSELECTOR_DATA_GET(WIDGET(item), sd); 333 ELM_DISKSELECTOR_DATA_GET(WIDGET(item), sd);
334 sd->item_count -= 1; 334 sd->item_count -= 1;
335 eina_stringshare_del(item->label); 335 eina_stringshare_del(item->label);
336 336 evas_object_del(item->icon);
337 if (item->icon)
338 evas_object_del(item->icon);
339} 337}
340 338
341static void 339static void
@@ -488,7 +486,7 @@ _item_icon_set(Elm_Diskselector_Item *it,
488{ 486{
489 if (it->icon == icon) return; 487 if (it->icon == icon) return;
490 488
491 if (it->icon) evas_object_del(it->icon); 489 evas_object_del(it->icon);
492 it->icon = icon; 490 it->icon = icon;
493 491
494 if (VIEW(it)) 492 if (VIEW(it))
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index c8774c9cc..0ce8cf320 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1419,9 +1419,9 @@ _magnifier_create(void *data)
1419 Evas *e; 1419 Evas *e;
1420 Evas_Coord w, h, mw, mh; 1420 Evas_Coord w, h, mw, mh;
1421 1421
1422 if (sd->mgf_proxy) evas_object_del(sd->mgf_proxy); 1422 evas_object_del(sd->mgf_proxy);
1423 if (sd->mgf_bg) evas_object_del(sd->mgf_bg); 1423 evas_object_del(sd->mgf_bg);
1424 if (sd->mgf_clip) evas_object_del(sd->mgf_clip); 1424 evas_object_del(sd->mgf_clip);
1425 1425
1426 e = evas_object_evas_get(data); 1426 e = evas_object_evas_get(data);
1427 1427
@@ -2124,8 +2124,7 @@ _entry_hover_anchor_clicked_do(Evas_Object *obj,
2124 !elm_layout_content_get(sd->anchor_hover.hover, "top") && 2124 !elm_layout_content_get(sd->anchor_hover.hover, "top") &&
2125 !elm_layout_content_get(sd->anchor_hover.hover, "bottom")) 2125 !elm_layout_content_get(sd->anchor_hover.hover, "bottom"))
2126 { 2126 {
2127 evas_object_del(sd->anchor_hover.hover); 2127 ELM_SAFE_FREE(sd->anchor_hover.hover, evas_object_del);
2128 sd->anchor_hover.hover = NULL;
2129 } 2128 }
2130 else 2129 else
2131 evas_object_show(sd->anchor_hover.hover); 2130 evas_object_show(sd->anchor_hover.hover);
diff --git a/src/lib/elm_factory.c b/src/lib/elm_factory.c
index bb25f627e..212f5121b 100644
--- a/src/lib/elm_factory.c
+++ b/src/lib/elm_factory.c
@@ -253,7 +253,7 @@ _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
253 if (wd->content == content) return; 253 if (wd->content == content) return;
254 254
255 prev_content = _content_unset_hook(obj, part); 255 prev_content = _content_unset_hook(obj, part);
256 if (prev_content) evas_object_del(prev_content); 256 evas_object_del(prev_content);
257 257
258 wd->content = content; 258 wd->content = content;
259 if (!content) return; 259 if (!content) return;
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index f1087374c..f47442f00 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -1749,7 +1749,7 @@ _flip_content_set(Evas_Object *obj,
1749 1749
1750 if (*cont == content) return EINA_TRUE; 1750 if (*cont == content) return EINA_TRUE;
1751 1751
1752 if (*cont) evas_object_del(*cont); 1752 evas_object_del(*cont);
1753 *cont = content; 1753 *cont = content;
1754 1754
1755 if (content) 1755 if (content)
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index a82454ee2..925671a96 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -1293,8 +1293,7 @@ _item_cache_add(Elm_Gen_Item *it)
1293 evas_event_freeze(evas_object_evas_get(obj)); 1293 evas_event_freeze(evas_object_evas_get(obj));
1294 if (sd->item_cache_max <= 0) 1294 if (sd->item_cache_max <= 0)
1295 { 1295 {
1296 evas_object_del(VIEW(it)); 1296 ELM_SAFE_FREE(VIEW(it), evas_object_del);
1297 VIEW(it) = NULL;
1298 ELM_SAFE_FREE(it->spacer, evas_object_del); 1297 ELM_SAFE_FREE(it->spacer, evas_object_del);
1299 1298
1300 evas_event_thaw(evas_object_evas_get(obj)); 1299 evas_event_thaw(evas_object_evas_get(obj));
@@ -4472,8 +4471,7 @@ _item_unrealize_cb(Elm_Gen_Item *it)
4472 4471
4473 if (it->item->nocache_once || it->item->nocache) 4472 if (it->item->nocache_once || it->item->nocache)
4474 { 4473 {
4475 evas_object_del(VIEW(it)); 4474 ELM_SAFE_FREE(VIEW(it), evas_object_del);
4476 VIEW(it) = NULL;
4477 ELM_SAFE_FREE(it->spacer, evas_object_del); 4475 ELM_SAFE_FREE(it->spacer, evas_object_del);
4478 } 4476 }
4479 else 4477 else
@@ -4988,10 +4986,7 @@ _elm_genlist_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
4988 sd->queue = eina_list_free(sd->queue); 4986 sd->queue = eina_list_free(sd->queue);
4989 elm_genlist_clear(obj); 4987 elm_genlist_clear(obj);
4990 for (i = 0; i < 2; i++) 4988 for (i = 0; i < 2; i++)
4991 { 4989 ELM_SAFE_FREE(sd->stack[i], evas_object_del);
4992 evas_object_del(sd->stack[i]);
4993 sd->stack[i] = NULL;
4994 }
4995 eo_unref(sd->pan_obj); 4990 eo_unref(sd->pan_obj);
4996 ELM_SAFE_FREE(sd->pan_obj, evas_object_del); 4991 ELM_SAFE_FREE(sd->pan_obj, evas_object_del);
4997 4992
diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c
index 48a95a176..ca41279da 100644
--- a/src/lib/elm_hover.c
+++ b/src/lib/elm_hover.c
@@ -398,13 +398,7 @@ static void
398_elm_hover_subs_del(Elm_Hover_Smart_Data *sd) 398_elm_hover_subs_del(Elm_Hover_Smart_Data *sd)
399{ 399{
400 ELM_HOVER_PARTS_FOREACH 400 ELM_HOVER_PARTS_FOREACH
401 { 401 ELM_SAFE_FREE(sd->subs[i].obj, evas_object_del);
402 if (sd->subs[i].obj)
403 {
404 evas_object_del(sd->subs[i].obj);
405 sd->subs[i].obj = NULL;
406 }
407 }
408} 402}
409 403
410static void 404static void
diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c
index 6136e8311..533de873f 100644
--- a/src/lib/elm_icon.c
+++ b/src/lib/elm_icon.c
@@ -381,14 +381,12 @@ _elm_icon_smart_file_set(Eo *obj, void *_pd, va_list *list)
381 381
382 /* parent's edje file setting path replicated here (we got .eet 382 /* parent's edje file setting path replicated here (we got .eet
383 * extension, so bypassing it) */ 383 * extension, so bypassing it) */
384 if (id->prev_img) 384 ELM_SAFE_FREE(id->prev_img, evas_object_del);
385 evas_object_del(id->prev_img);
386 id->prev_img = NULL;
387 385
388 if (!id->edje) 386 if (!id->edje)
389 { 387 {
390 pclip = evas_object_clip_get(id->img); 388 pclip = evas_object_clip_get(id->img);
391 if (id->img) evas_object_del(id->img); 389 evas_object_del(id->img);
392 390
393 /* Edje object instead */ 391 /* Edje object instead */
394 id->img = edje_object_add(evas_object_evas_get(obj)); 392 id->img = edje_object_add(evas_object_evas_get(obj));
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index dd68e834e..cb0e27b10 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -204,7 +204,7 @@ _elm_image_edje_file_set(Evas_Object *obj,
204 if (!sd->edje) 204 if (!sd->edje)
205 { 205 {
206 pclip = evas_object_clip_get(sd->img); 206 pclip = evas_object_clip_get(sd->img);
207 if (sd->img) evas_object_del(sd->img); 207 evas_object_del(sd->img);
208 208
209 /* Edje object instead */ 209 /* Edje object instead */
210 sd->img = edje_object_add(evas_object_evas_get(obj)); 210 sd->img = edje_object_add(evas_object_evas_get(obj));
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index eaaa51030..5b9597eb4 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -81,11 +81,8 @@ _index_box_clear(Evas_Object *obj,
81 81
82 EINA_LIST_FOREACH(sd->items, l, it) 82 EINA_LIST_FOREACH(sd->items, l, it)
83 { 83 {
84 if (!VIEW(it)) continue;
85 if (it->level != level) continue; 84 if (it->level != level) continue;
86 85 ELM_SAFE_FREE(VIEW(it), evas_object_del);
87 evas_object_del(VIEW(it));
88 VIEW(it) = NULL;
89 } 86 }
90 87
91 sd->level_active[level] = EINA_FALSE; 88 sd->level_active[level] = EINA_FALSE;
@@ -362,11 +359,9 @@ _elm_index_smart_theme(Eo *obj, void *_pd, va_list *list)
362 } 359 }
363 elm_layout_content_set(obj, "elm.swallow.index.1", sd->bx[1]); 360 elm_layout_content_set(obj, "elm.swallow.index.1", sd->bx[1]);
364 } 361 }
365 else if (sd->bx[1]) 362 else
366 { 363 ELM_SAFE_FREE(sd->bx[1], evas_object_del);
367 evas_object_del(sd->bx[1]); 364
368 sd->bx[1] = NULL;
369 }
370 if (edje_object_part_exists 365 if (edje_object_part_exists
371 (wd->resize_obj, "elm.swallow.event.1")) 366 (wd->resize_obj, "elm.swallow.event.1"))
372 { 367 {
@@ -380,11 +375,9 @@ _elm_index_smart_theme(Eo *obj, void *_pd, va_list *list)
380 elm_layout_content_set(obj, "elm.swallow.event.1", sd->event_rect[1]); 375 elm_layout_content_set(obj, "elm.swallow.event.1", sd->event_rect[1]);
381 evas_object_size_hint_min_set(sd->event_rect[1], minw, minh); 376 evas_object_size_hint_min_set(sd->event_rect[1], minw, minh);
382 } 377 }
383 else if (sd->event_rect[1]) 378 else
384 { 379 ELM_SAFE_FREE(sd->event_rect[1], evas_object_del);
385 evas_object_del(sd->event_rect[1]); 380
386 sd->event_rect[1] = NULL;
387 }
388 edje_object_message_signal_process(wd->resize_obj); 381 edje_object_message_signal_process(wd->resize_obj);
389 382
390 elm_layout_sizing_eval(obj); 383 elm_layout_sizing_eval(obj);
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 0f168d73f..1ba09803a 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -3845,11 +3845,7 @@ _elm_scroll_extern_pan_set(Eo *obj, void *_pd, va_list *list)
3845 } 3845 }
3846 else 3846 else
3847 { 3847 {
3848 if (sid->pan_obj) 3848 ELM_SAFE_FREE(sid->pan_obj, evas_object_del);
3849 {
3850 evas_object_del(sid->pan_obj);
3851 sid->pan_obj = NULL;
3852 }
3853 } 3849 }
3854 if (!pan) 3850 if (!pan)
3855 { 3851 {
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 8ca8825c3..13fd48075 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1396,11 +1396,7 @@ _item_content_set_hook(Elm_Object_Item *it,
1396 evas_object_rectangle_add(evas_object_evas_get(WIDGET(item))); 1396 evas_object_rectangle_add(evas_object_evas_get(WIDGET(item)));
1397 evas_object_color_set(content, 0, 0, 0, 0); 1397 evas_object_color_set(content, 0, 0, 0, 0);
1398 } 1398 }
1399 if (*icon_p) 1399 evas_object_del(*icon_p);
1400 {
1401 evas_object_del(*icon_p);
1402 *icon_p = NULL;
1403 }
1404 *icon_p = content; 1400 *icon_p = content;
1405 1401
1406 if (VIEW(item)) 1402 if (VIEW(item))
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 8e681d436..b8549821d 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -1505,7 +1505,7 @@ _overlay_default_content_update(Overlay_Default *ovl,
1505 EINA_SAFETY_ON_NULL_RETURN(ovl); 1505 EINA_SAFETY_ON_NULL_RETURN(ovl);
1506 1506
1507 if (ovl->content == content) return; 1507 if (ovl->content == content) return;
1508 if (ovl->content) evas_object_del(ovl->content); 1508 evas_object_del(ovl->content);
1509 ovl->content = content; 1509 ovl->content = content;
1510 1510
1511 if (ovl->content) 1511 if (ovl->content)
@@ -1555,7 +1555,7 @@ _overlay_default_class_content_update(Overlay_Default *ovl,
1555{ 1555{
1556 EINA_SAFETY_ON_NULL_RETURN(ovl); 1556 EINA_SAFETY_ON_NULL_RETURN(ovl);
1557 1557
1558 if (ovl->clas_content) evas_object_del(ovl->clas_content); 1558 evas_object_del(ovl->clas_content);
1559 ovl->clas_content = _icon_dup(content, ovl->layout); 1559 ovl->clas_content = _icon_dup(content, ovl->layout);
1560 _overlay_default_layout_update(ovl); 1560 _overlay_default_layout_update(ovl);
1561} 1561}
@@ -1568,7 +1568,7 @@ _overlay_default_icon_update(Overlay_Default *ovl,
1568 1568
1569 if (ovl->icon == icon) return; 1569 if (ovl->icon == icon) return;
1570 1570
1571 if (ovl->icon) evas_object_del(ovl->icon); 1571 evas_object_del(ovl->icon);
1572 ovl->icon = icon; 1572 ovl->icon = icon;
1573 _overlay_default_layout_update(ovl); 1573 _overlay_default_layout_update(ovl);
1574} 1574}
@@ -1579,7 +1579,7 @@ _overlay_default_class_icon_update(Overlay_Default *ovl,
1579{ 1579{
1580 EINA_SAFETY_ON_NULL_RETURN(ovl); 1580 EINA_SAFETY_ON_NULL_RETURN(ovl);
1581 1581
1582 if (ovl->clas_icon) evas_object_del(ovl->clas_icon); 1582 evas_object_del(ovl->clas_icon);
1583 ovl->clas_icon = _icon_dup(icon, ovl->layout); 1583 ovl->clas_icon = _icon_dup(icon, ovl->layout);
1584 _overlay_default_layout_update(ovl); 1584 _overlay_default_layout_update(ovl);
1585} 1585}
@@ -1599,11 +1599,11 @@ _overlay_default_free(Overlay_Default *ovl)
1599{ 1599{
1600 EINA_SAFETY_ON_NULL_RETURN(ovl); 1600 EINA_SAFETY_ON_NULL_RETURN(ovl);
1601 1601
1602 if (ovl->content) evas_object_del(ovl->content); 1602 evas_object_del(ovl->content);
1603 if (ovl->icon) evas_object_del(ovl->icon); 1603 evas_object_del(ovl->icon);
1604 if (ovl->clas_content) evas_object_del(ovl->clas_content); 1604 evas_object_del(ovl->clas_content);
1605 if (ovl->clas_icon) evas_object_del(ovl->clas_icon); 1605 evas_object_del(ovl->clas_icon);
1606 if (ovl->layout) evas_object_del(ovl->layout); 1606 evas_object_del(ovl->layout);
1607 1607
1608 free(ovl); 1608 free(ovl);
1609} 1609}
@@ -1777,7 +1777,7 @@ _overlay_class_icon_update(Overlay_Class *ovl,
1777 EINA_SAFETY_ON_NULL_RETURN(ovl); 1777 EINA_SAFETY_ON_NULL_RETURN(ovl);
1778 1778
1779 if (ovl->icon == icon) return; 1779 if (ovl->icon == icon) return;
1780 if (ovl->icon) evas_object_del(ovl->icon); 1780 evas_object_del(ovl->icon);
1781 ovl->icon = icon; 1781 ovl->icon = icon;
1782 // For using proxy, it should have size and be shown but moved away to hide. 1782 // For using proxy, it should have size and be shown but moved away to hide.
1783 evas_object_resize(icon, 32, 32); 1783 evas_object_resize(icon, 32, 32);
@@ -1804,7 +1804,7 @@ _overlay_class_content_update(Overlay_Class *ovl,
1804 EINA_SAFETY_ON_NULL_RETURN(ovl); 1804 EINA_SAFETY_ON_NULL_RETURN(ovl);
1805 1805
1806 if (ovl->content == content) return; 1806 if (ovl->content == content) return;
1807 if (ovl->content) evas_object_del(ovl->content); 1807 evas_object_del(ovl->content);
1808 ovl->content = content; 1808 ovl->content = content;
1809 // For using proxy, it should have size and be shown but moved away to hide. 1809 // For using proxy, it should have size and be shown but moved away to hide.
1810 // content should have it's own size 1810 // content should have it's own size
@@ -1855,8 +1855,8 @@ _overlay_class_free(Overlay_Class *clas)
1855 _overlay_default_class_icon_update(overlay->ovl, NULL); 1855 _overlay_default_class_icon_update(overlay->ovl, NULL);
1856 } 1856 }
1857 } 1857 }
1858 if (clas->icon) evas_object_del(clas->icon); 1858 evas_object_del(clas->icon);
1859 if (clas->members) eina_list_free(clas->members); 1859 eina_list_free(clas->members);
1860 1860
1861 free(clas); 1861 free(clas);
1862} 1862}
diff --git a/src/lib/elm_mapbuf.c b/src/lib/elm_mapbuf.c
index 7403db8bc..3aff346e7 100644
--- a/src/lib/elm_mapbuf.c
+++ b/src/lib/elm_mapbuf.c
@@ -220,7 +220,7 @@ _elm_mapbuf_smart_content_set(Eo *obj, void *_pd, va_list *list)
220 return; 220 return;
221 } 221 }
222 222
223 if (sd->content) evas_object_del(sd->content); 223 evas_object_del(sd->content);
224 sd->content = content; 224 sd->content = content;
225 225
226 if (content) 226 if (content)
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index 7fa0d200c..f41b75c5a 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -305,8 +305,7 @@ _item_content_set_hook(Elm_Object_Item *it,
305 item = (Elm_Menu_Item *)it; 305 item = (Elm_Menu_Item *)it;
306 if (content == item->content) return; 306 if (content == item->content) return;
307 307
308 if (item->content) evas_object_del(item->content); 308 evas_object_del(item->content);
309
310 item->content = content; 309 item->content = content;
311 if (item->content) 310 if (item->content)
312 elm_layout_content_set(VIEW(item), "elm.swallow.content", item->content); 311 elm_layout_content_set(VIEW(item), "elm.swallow.content", item->content);
@@ -634,8 +633,8 @@ _elm_menu_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
634 evas_object_event_callback_del_full 633 evas_object_event_callback_del_full
635 (sd->bx, EVAS_CALLBACK_RESIZE, _menu_resize_cb, obj); 634 (sd->bx, EVAS_CALLBACK_RESIZE, _menu_resize_cb, obj);
636 635
637 if (sd->hv) evas_object_del(sd->hv); 636 evas_object_del(sd->hv);
638 if (sd->location) evas_object_del(sd->location); 637 evas_object_del(sd->location);
639 638
640 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 639 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
641} 640}
diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index def1d6c4d..c03adb4db 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -405,7 +405,7 @@ _elm_notify_smart_content_set(Eo *obj, void *_pd, va_list *list)
405 if (part && strcmp(part, "default")) return; 405 if (part && strcmp(part, "default")) return;
406 if (sd->content == content) goto end; 406 if (sd->content == content) goto end;
407 407
408 if (sd->content) evas_object_del(sd->content); 408 evas_object_del(sd->content);
409 sd->content = content; 409 sd->content = content;
410 410
411 if (content) 411 if (content)
diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c
index 661e18394..cdc1a8b02 100644
--- a/src/lib/elm_photocam.c
+++ b/src/lib/elm_photocam.c
@@ -1408,8 +1408,7 @@ _elm_photocam_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1408 free(g); 1408 free(g);
1409 } 1409 }
1410 eo_unref(sd->pan_obj); 1410 eo_unref(sd->pan_obj);
1411 evas_object_del(sd->pan_obj); 1411 ELM_SAFE_FREE(sd->pan_obj, evas_object_del);
1412 sd->pan_obj = NULL;
1413 1412
1414 if (sd->f) eina_file_close(sd->f); 1413 if (sd->f) eina_file_close(sd->f);
1415 free(sd->remote_data); 1414 free(sd->remote_data);
@@ -2262,11 +2261,7 @@ _gesture_enabled_set(Eo *obj, void *_pd, va_list *list)
2262 2261
2263 sd->do_gesture = gesture; 2262 sd->do_gesture = gesture;
2264 2263
2265 if (sd->g_layer) 2264 ELM_SAFE_FREE(sd->g_layer, evas_object_del);
2266 {
2267 evas_object_del(sd->g_layer);
2268 sd->g_layer = NULL;
2269 }
2270 2265
2271 if (!gesture) return; 2266 if (!gesture) return;
2272 2267
diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c
index 443b49ea0..ff487e015 100644
--- a/src/lib/elm_prefs.c
+++ b/src/lib/elm_prefs.c
@@ -1034,13 +1034,11 @@ _elm_prefs_page_populate(Elm_Prefs_Page_Node *page,
1034err: 1034err:
1035 EINA_LIST_FOREACH(page->items, l, it) 1035 EINA_LIST_FOREACH(page->items, l, it)
1036 { 1036 {
1037 if (it->w_obj) evas_object_del(it->w_obj); 1037 ELM_SAFE_FREE(it->w_obj, evas_object_del);
1038 it->w_obj = NULL;
1039 it->w_impl = NULL; 1038 it->w_impl = NULL;
1040 } 1039 }
1041 1040
1042 if (page->w_obj) evas_object_del(page->w_obj); 1041 ELM_SAFE_FREE(page->w_obj, evas_object_del);
1043 page->w_obj = NULL;
1044 page->w_impl = NULL; 1042 page->w_impl = NULL;
1045 1043
1046 return EINA_FALSE; 1044 return EINA_FALSE;
@@ -2084,10 +2082,10 @@ _prefs_item_del_cb(void *data EINA_UNUSED,
2084 2082
2085 it = evas_object_data_get(obj, "prefs_item"); 2083 it = evas_object_data_get(obj, "prefs_item");
2086 lbl = evas_object_data_del(it->w_obj, "label_widget"); 2084 lbl = evas_object_data_del(it->w_obj, "label_widget");
2087 if (lbl) evas_object_del(lbl); 2085 evas_object_del(lbl);
2088 2086
2089 icon = evas_object_data_del(it->w_obj, "icon_widget"); 2087 icon = evas_object_data_del(it->w_obj, "icon_widget");
2090 if (icon) evas_object_del(icon); 2088 evas_object_del(icon);
2091 2089
2092 ELM_PREFS_DATA_GET(it->prefs, sd); 2090 ELM_PREFS_DATA_GET(it->prefs, sd);
2093 2091
diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c
index 0391bfff2..00d61f907 100644
--- a/src/lib/elm_scroller.c
+++ b/src/lib/elm_scroller.c
@@ -654,7 +654,7 @@ _elm_scroller_smart_content_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
654 654
655 if (sd->content == content) return; 655 if (sd->content == content) return;
656 656
657 if (sd->content) evas_object_del(sd->content); 657 evas_object_del(sd->content);
658 sd->content = content; 658 sd->content = content;
659 659
660 if (content) 660 if (content)
diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index b2f79c6d6..2d46089b3 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -460,7 +460,7 @@ _item_content_set_hook(Elm_Object_Item *it,
460 { 460 {
461 if (content == item->icon) return; 461 if (content == item->icon) return;
462 462
463 if (item->icon) evas_object_del(item->icon); 463 evas_object_del(item->icon);
464 item->icon = content; 464 item->icon = content;
465 if (!item->icon) 465 if (!item->icon)
466 { 466 {
diff --git a/src/lib/elm_slideshow.c b/src/lib/elm_slideshow.c
index dcdf5f557..746f1de6b 100644
--- a/src/lib/elm_slideshow.c
+++ b/src/lib/elm_slideshow.c
@@ -223,8 +223,7 @@ _item_realize(Elm_Slideshow_Item *item)
223 (sd->items_built, sd->items_built); 223 (sd->items_built, sd->items_built);
224 if (item->itc->func.del) 224 if (item->itc->func.del)
225 item->itc->func.del(elm_widget_item_data_get(item), VIEW(item)); 225 item->itc->func.del(elm_widget_item_data_get(item), VIEW(item));
226 evas_object_del(VIEW(item)); 226 ELM_SAFE_FREE(VIEW(item), evas_object_del);
227 VIEW(item) = NULL;
228 } 227 }
229} 228}
230 229
diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c
index 3119b0e92..6b00582ed 100644
--- a/src/lib/elm_thumb.c
+++ b/src/lib/elm_thumb.c
@@ -206,8 +206,7 @@ _thumb_finish(Elm_Thumb_Smart_Data *sd,
206 evas = evas_object_evas_get(sd->obj); 206 evas = evas_object_evas_get(sd->obj);
207 if ((sd->view) && (sd->is_video ^ sd->was_video)) 207 if ((sd->view) && (sd->is_video ^ sd->was_video))
208 { 208 {
209 evas_object_del(sd->view); 209 ELM_SAFE_FREE(sd->view, evas_object_del);
210 sd->view = NULL;
211 } 210 }
212 sd->was_video = sd->is_video; 211 sd->was_video = sd->is_video;
213 212
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 8c37d3bbd..dc49542ef 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -121,11 +121,7 @@ _items_visibility_fix(Elm_Toolbar_Smart_Data *sd,
121static void 121static void
122_item_menu_destroy(Elm_Toolbar_Item *item) 122_item_menu_destroy(Elm_Toolbar_Item *item)
123{ 123{
124 if (item->o_menu) 124 ELM_SAFE_FREE(item->o_menu, evas_object_del);
125 {
126 evas_object_del(item->o_menu);
127 item->o_menu = NULL;
128 }
129 item->menu = EINA_FALSE; 125 item->menu = EINA_FALSE;
130} 126}
131 127
@@ -934,10 +930,10 @@ _item_del(Elm_Toolbar_Item *it)
934 evas_object_del(it->icon); 930 evas_object_del(it->icon);
935 } 931 }
936 932
937 if (it->object) evas_object_del(it->object); 933 evas_object_del(it->object);
938 //TODO: See if checking for sd->menu_parent is necessary before 934 //TODO: See if checking for sd->menu_parent is necessary before
939 //deleting menu 935 //deleting menu
940 if (it->o_menu) evas_object_del(it->o_menu); 936 evas_object_del(it->o_menu);
941} 937}
942 938
943static void 939static void
@@ -1346,7 +1342,7 @@ _item_content_set_hook(Elm_Object_Item *it,
1346 if (part && strcmp(part, "object")) return; 1342 if (part && strcmp(part, "object")) return;
1347 if (item->object == content) return; 1343 if (item->object == content) return;
1348 1344
1349 if (item->object) evas_object_del(item->object); 1345 evas_object_del(item->object);
1350 1346
1351 item->object = content; 1347 item->object = content;
1352 if (item->object) 1348 if (item->object)
@@ -1574,8 +1570,7 @@ _transit_del_cb(void *data, Elm_Transit *transit EINA_UNUSED)
1574 if (item->proxy) 1570 if (item->proxy)
1575 { 1571 {
1576 evas_object_image_source_visible_set(elm_image_object_get(item->proxy), EINA_TRUE); 1572 evas_object_image_source_visible_set(elm_image_object_get(item->proxy), EINA_TRUE);
1577 evas_object_del(item->proxy); 1573 ELM_SAFE_FREE(item->proxy, evas_object_del);
1578 item->proxy = NULL;
1579 } 1574 }
1580 item->trans = NULL; 1575 item->trans = NULL;
1581 1576
@@ -1759,8 +1754,7 @@ _mouse_up_reorder(Elm_Toolbar_Item *it,
1759 if (it->proxy) 1754 if (it->proxy)
1760 { 1755 {
1761 evas_object_image_source_visible_set(elm_image_object_get(it->proxy), EINA_TRUE); 1756 evas_object_image_source_visible_set(elm_image_object_get(it->proxy), EINA_TRUE);
1762 evas_object_del(it->proxy); 1757 ELM_SAFE_FREE(it->proxy, evas_object_del);
1763 it->proxy = NULL;
1764 } 1758 }
1765 1759
1766 eo_do(obj, elm_scrollable_interface_hold_set(EINA_FALSE)); 1760 eo_do(obj, elm_scrollable_interface_hold_set(EINA_FALSE));
@@ -3557,8 +3551,7 @@ elm_toolbar_item_state_add(Elm_Object_Item *it,
3557 3551
3558 if (!_item_icon_set(icon_obj, "toolbar/", icon)) 3552 if (!_item_icon_set(icon_obj, "toolbar/", icon))
3559 { 3553 {
3560 evas_object_del(icon_obj); 3554 ELM_SAFE_FREE(icon_obj, evas_object_del);
3561 icon_obj = NULL;
3562 icon = NULL; 3555 icon = NULL;
3563 } 3556 }
3564 3557
@@ -3602,7 +3595,7 @@ elm_toolbar_item_state_del(Elm_Object_Item *it,
3602 3595
3603 eina_stringshare_del(state->label); 3596 eina_stringshare_del(state->label);
3604 eina_stringshare_del(state->icon_str); 3597 eina_stringshare_del(state->icon_str);
3605 if (state->icon) evas_object_del(state->icon); 3598 evas_object_del(state->icon);
3606 free(state); 3599 free(state);
3607 3600
3608 item->states = eina_list_remove_list(item->states, del_state); 3601 item->states = eina_list_remove_list(item->states, del_state);
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 750c972a1..0a375563a 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -5063,8 +5063,7 @@ _elm_widget_item_free(Elm_Widget_Item *item)
5063 if (item->del_func) 5063 if (item->del_func)
5064 item->del_func((void *)item->data, item->widget, item); 5064 item->del_func((void *)item->data, item->widget, item);
5065 5065
5066 if (item->view) 5066 evas_object_del(item->view);
5067 evas_object_del(item->view);
5068 5067
5069 eina_stringshare_del(item->access_info); 5068 eina_stringshare_del(item->access_info);
5070 5069
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 993f4cdb6..6b4eb874e 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1498,8 +1498,7 @@ _elm_win_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1498 eina_stringshare_del(sd->icon_name); 1498 eina_stringshare_del(sd->icon_name);
1499 eina_stringshare_del(sd->role); 1499 eina_stringshare_del(sd->role);
1500 evas_object_del(sd->icon); 1500 evas_object_del(sd->icon);
1501 1501 evas_object_del(sd->main_menu);
1502 if (sd->main_menu) evas_object_del(sd->main_menu);
1503 1502
1504 _elm_win_profile_del(sd); 1503 _elm_win_profile_del(sd);
1505 _elm_win_available_profiles_del(sd); 1504 _elm_win_available_profiles_del(sd);
@@ -2471,8 +2470,7 @@ _elm_win_frame_add(Elm_Win_Smart_Data *sd,
2471 if (!elm_widget_theme_object_set 2470 if (!elm_widget_theme_object_set
2472 (sd->obj, sd->frame_obj, "border", "base", style)) 2471 (sd->obj, sd->frame_obj, "border", "base", style))
2473 { 2472 {
2474 evas_object_del(sd->frame_obj); 2473 ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
2475 sd->frame_obj = NULL;
2476 return; 2474 return;
2477 } 2475 }
2478 2476
@@ -2542,11 +2540,7 @@ _elm_win_frame_del(Elm_Win_Smart_Data *sd)
2542{ 2540{
2543 int w, h; 2541 int w, h;
2544 2542
2545 if (sd->client_obj) 2543 ELM_SAFE_FREE(sd->client_obj, evas_object_del);
2546 {
2547 evas_object_del(sd->client_obj);
2548 sd->client_obj = NULL;
2549 }
2550 2544
2551 if (sd->frame_obj) 2545 if (sd->frame_obj)
2552 { 2546 {
@@ -2580,8 +2574,7 @@ _elm_win_frame_del(Elm_Win_Smart_Data *sd)
2580 (sd->frame_obj, "elm,action,close", "elm", 2574 (sd->frame_obj, "elm,action,close", "elm",
2581 _elm_win_frame_cb_close); 2575 _elm_win_frame_cb_close);
2582 2576
2583 evas_object_del(sd->frame_obj); 2577 ELM_SAFE_FREE(sd->frame_obj, evas_object_del);
2584 sd->frame_obj = NULL;
2585 } 2578 }
2586 2579
2587 evas_output_framespace_set(sd->evas, 0, 0, 0, 0); 2580 evas_output_framespace_set(sd->evas, 0, 0, 0, 0);
@@ -2832,8 +2825,7 @@ _win_constructor(Eo *obj, void *_pd, va_list *list)
2832 tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj); 2825 tmp_sd.ee = ecore_evas_object_ecore_evas_get(tmp_sd.img_obj);
2833 if (!tmp_sd.ee) 2826 if (!tmp_sd.ee)
2834 { 2827 {
2835 evas_object_del(tmp_sd.img_obj); 2828 ELM_SAFE_FREE(tmp_sd.img_obj, evas_object_del);
2836 tmp_sd.img_obj = NULL;
2837 } 2829 }
2838 } 2830 }
2839 break; 2831 break;
diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index 340fbe273..733a4bc78 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -182,8 +182,7 @@ _elm_cursor_obj_add(Evas_Object *obj, Elm_Cursor *cur)
182 if (!_elm_theme_object_set(obj, cur->obj, "cursor", cur->cursor_name, 182 if (!_elm_theme_object_set(obj, cur->obj, "cursor", cur->cursor_name,
183 cur->style ? cur->style : "default")) 183 cur->style ? cur->style : "default"))
184 { 184 {
185 evas_object_del(cur->obj); 185 ELM_SAFE_FREE(cur->obj, evas_object_del);
186 cur->obj = NULL;
187 return EINA_FALSE; 186 return EINA_FALSE;
188 } 187 }
189 188
@@ -439,8 +438,7 @@ elm_object_cursor_unset(Evas_Object *obj)
439 { 438 {
440 evas_object_event_callback_del_full(cur->obj, EVAS_CALLBACK_DEL, 439 evas_object_event_callback_del_full(cur->obj, EVAS_CALLBACK_DEL,
441 _elm_cursor_obj_del, cur); 440 _elm_cursor_obj_del, cur);
442 evas_object_del(cur->obj); 441 ELM_SAFE_FREE(cur->obj, evas_object_del);
443 cur->obj = NULL;
444 } 442 }
445 443
446 if (cur->visible) 444 if (cur->visible)
@@ -518,11 +516,7 @@ elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_sea
518{ 516{
519 ELM_CURSOR_GET_OR_RETURN(cur, obj); 517 ELM_CURSOR_GET_OR_RETURN(cur, obj);
520 cur->theme_search = theme_search; 518 cur->theme_search = theme_search;
521 if (cur->obj) 519 ELM_SAFE_FREE(cur->obj, evas_object_del);
522 {
523 evas_object_del(cur->obj);
524 cur->obj = NULL;
525 }
526 _elm_cursor_cur_set(cur); 520 _elm_cursor_cur_set(cur);
527} 521}
528 522
diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c
index 9157f312f..dc899a50e 100644
--- a/src/lib/els_tooltip.c
+++ b/src/lib/els_tooltip.c
@@ -183,8 +183,7 @@ _elm_tooltip_content_del(Elm_Tooltip *tt)
183 (tt->content, EVAS_CALLBACK_DEL, 183 (tt->content, EVAS_CALLBACK_DEL,
184 _elm_tooltip_content_del_cb, tt); 184 _elm_tooltip_content_del_cb, tt);
185 evas_object_hide(tt->content); 185 evas_object_hide(tt->content);
186 evas_object_del(tt->content); 186 ELM_SAFE_FREE(tt->content, evas_object_del);
187 tt->content = NULL;
188} 187}
189 188
190static void 189static void