evas/evas3d: call eo_unref() after eo_add().
since eo default ref count is 1 and increased by canvas parent again, they should be unref() called if they wanna deleted automatically. I wonder if evas unref the objects while it removes the objects from it's list, then user don't need to call eo_unref() manually which may cause a mistake in usage.
This commit is contained in:
parent
69c9df439e
commit
c84668d2c3
|
@ -247,6 +247,7 @@ main(void)
|
|||
|
||||
/* Add a background rectangle objects. */
|
||||
background = eo_add(EVAS_OBJ_RECTANGLE_CLASS, evas);
|
||||
eo_unref(background);
|
||||
eo_do(background,
|
||||
evas_obj_color_set(0, 0, 0, 255),
|
||||
evas_obj_size_set(WIDTH, HEIGHT),
|
||||
|
|
|
@ -313,6 +313,7 @@ main(void)
|
|||
|
||||
/* Add a background rectangle objects. */
|
||||
background = eo_add(EVAS_OBJ_RECTANGLE_CLASS, evas);
|
||||
eo_unref(background);
|
||||
eo_do(background,
|
||||
evas_obj_color_set(0, 0, 0, 255),
|
||||
evas_obj_size_set(WIDTH, HEIGHT),
|
||||
|
|
|
@ -160,6 +160,7 @@ main(void)
|
|||
|
||||
/* Add a background rectangle objects. */
|
||||
background = eo_add(EVAS_OBJ_RECTANGLE_CLASS, evas);
|
||||
eo_unref(background);
|
||||
eo_do(background,
|
||||
evas_obj_color_set(0, 0, 0, 255),
|
||||
evas_obj_size_set(WIDTH, HEIGHT),
|
||||
|
|
Loading…
Reference in New Issue