BigW Consortium Gitlab

Unverified Commit 31488478 by Gabor Kiss-Vamosi Committed by GitHub

Merge pull request #60 from BenQoo/beta

lv_group: fix memory leak.
parents 6eea879a 59fa14f9
......@@ -52,6 +52,16 @@ lv_group_t * lv_group_create(void)
}
/**
* Delete a group object
* @param group pointer to a group
*/
void lv_group_del(lv_group_t * group)
{
lv_ll_clear(&(group->obj_ll));
lv_mem_free(group);
}
/**
* Add an object to a group
* @param group pointer to a group
* @param obj pointer to an object to add
......@@ -83,8 +93,8 @@ void lv_group_remove_obj(lv_obj_t * obj)
LL_READ(g->obj_ll, i) {
if(*i == obj) {
lv_ll_rem(&g->obj_ll, i);
lv_mem_free(i);
obj->group_p = NULL;
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment