static void
_item_unrealize_cb(Elm_Gen_Item *it)
{
- evas_object_del(VIEW(it));
- VIEW(it) = NULL;
- evas_object_del(it->spacer);
- it->spacer = NULL;
+ ELM_SAFE_FREE(VIEW(it), evas_object_del);
+ ELM_SAFE_FREE(it->spacer, evas_object_del);
}
static char *
if (!standby) sd->generation++;
- if (sd->state)
- {
- eina_inlist_sorted_state_free(sd->state);
- sd->state = NULL;
- }
+ ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
if (sd->walking > 0)
{
elm_gengrid_clear(obj);
eo_unref(sd->pan_obj);
- evas_object_del(sd->pan_obj);
- sd->pan_obj = NULL;
+ ELM_SAFE_FREE(sd->pan_obj, evas_object_del);
ELM_SAFE_FREE(sd->stack, evas_object_del);
if (sd->calc_job) ecore_job_del(sd->calc_job);
if (VIEW(it))
elm_widget_item_cursor_unset(it);
- eina_stringshare_del(it->mouse_cursor);
- it->mouse_cursor = NULL;
+ ELM_SAFE_FREE(it->mouse_cursor, eina_stringshare_del);
}
EAPI void