Dispose GLib.Values in GetProperty after usage
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 26 May 2009 07:48:22 +0000 (09:48 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 26 May 2009 07:48:22 +0000 (09:48 +0200)
gstreamer-sharp/Object.custom

index 94ddcc4..6af7057 100644 (file)
@@ -1,6 +1,9 @@
 public object this[string property] {
   get {
-    return GetProperty (property).Val;
+    GLib.Value v = GetProperty (property);
+    object o = v.Val;
+    v.Dispose ();
+    return o;
   }
   set {
     GLib.Value v = new GLib.Value (this, property);