projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee0bf5e
)
[clutter-texture] Unref the Cogl material on dispose
author
Neil Roberts
<neil@linux.intel.com>
Thu, 5 Feb 2009 18:27:04 +0000
(18:27 +0000)
committer
Neil Roberts
<neil@linux.intel.com>
Thu, 5 Feb 2009 18:27:04 +0000
(18:27 +0000)
The material is created in the _init function and is owned by the
ClutterTexture so it will be leaked if not freed.
clutter/clutter-texture.c
patch
|
blob
|
history
diff --git
a/clutter/clutter-texture.c
b/clutter/clutter-texture.c
index
c331b82
..
bd05456
100644
(file)
--- a/
clutter/clutter-texture.c
+++ b/
clutter/clutter-texture.c
@@
-685,6
+685,12
@@
clutter_texture_dispose (GObject *object)
}
clutter_texture_async_load_cancel (texture);
+
+ if (priv->material != COGL_INVALID_HANDLE)
+ {
+ cogl_material_unref (priv->material);
+ priv->material = COGL_INVALID_HANDLE;
+ }
G_OBJECT_CLASS (clutter_texture_parent_class)->dispose (object);
}