test-shader: Unref the ClutterShader after setting it on an actor

Otherwise the test leaks the shader object and the underlying GLSL
program.
This commit is contained in:
Neil Roberts 2010-07-22 17:27:04 +01:00
parent a639ed6593
commit 616eccdad6

View File

@ -277,6 +277,8 @@ set_shader_num (ClutterActor *actor, gint new_no)
1.0f / tex_height);
}
}
g_object_unref (shader);
}
}
@ -402,6 +404,8 @@ test_shader_main (gint argc, gchar *argv[])
clutter_actor_set_shader (actor, shader);
clutter_actor_set_position (actor, 100, 100);
g_object_unref (shader);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor);
clutter_actor_set_shader_param_int (actor, "tex", 0);