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:
ChunEon Park 2014-05-07 19:36:45 +09:00
parent 69c9df439e
commit c84668d2c3
3 changed files with 3 additions and 0 deletions

View File

@ -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),

View File

@ -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),

View File

@ -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),