1. unref - lower reference count or if it is 0, call item class free
2. free - delet all callbacks, if reference count is 0, free item or
if it is not, call item class unref
Change-Id: If370d2e6babd60ef43446a7c1ce88c79d7b71462
itc->version = CLASS_ALLOCATED;
itc->refcount = 1;
- itc->delete_me = EINA_FALSE;
return itc;
}
{
if (itc && (itc->version == CLASS_ALLOCATED))
{
- itc->delete_me = EINA_TRUE;
itc->func.text_get = NULL;
itc->func.content_get = NULL;
itc->func.state_get = NULL;
if (itc && (itc->version == CLASS_ALLOCATED))
{
if (itc->refcount > 0) itc->refcount--;
- if (itc->delete_me && (!itc->refcount))
- elm_genlist_item_class_free(itc);
+ if (!itc->refcount) elm_genlist_item_class_free(itc);
}
}