evas vg: fix another memory leak

@fix
This commit is contained in:
Hermet Park 2018-06-14 22:08:14 +09:00
parent 20404d79d4
commit ee2ca991fc
1 changed files with 5 additions and 1 deletions

View File

@ -326,7 +326,10 @@ _efl_canvas_vg_object_efl_object_destructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Dat
efl_event_callback_del(e, EFL_CANVAS_SCENE_EVENT_RENDER_POST, _cleanup_reference, pd);
efl_unref(pd->root);
pd->root = NULL;
if (pd->user_entry)
free(pd->user_entry);
efl_destructor(efl_super(eo_obj, MY_CLASS));
}
@ -343,6 +346,7 @@ _efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Da
obj->type = o_type;
/* root node */
//FIXME: Well. I don't think this is necessary if user set a new root node...
pd->root = efl_add_ref(EFL_CANVAS_VG_CONTAINER_CLASS, NULL);
eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);