Object: Fixed compilation on .NET
authorStephan Sundermann <stephansundermann@gmail.com>
Thu, 31 Oct 2013 13:47:44 +0000 (14:47 +0100)
committerStephan Sundermann <stephansundermann@gmail.com>
Sat, 21 Dec 2013 15:52:28 +0000 (16:52 +0100)
Using variables cannot be modified in .NET but can be in mono
so switch to a good old Dispose call here.

https://bugzilla.xamarin.com/show_bug.cgi?id=15832#c0

sources/custom/Object.cs

index 97a37dd..55a960d 100644 (file)
@@ -61,10 +61,10 @@ namespace Gst {
                                        if (gtype == null) {
                                                throw new Exception ("Could not find a GType for type " + type.FullName);
                                        }
-                                       using (GLib.Value v = new GLib.Value ((GLib.GType)value.GetType ())) {
-                                               v.Val = value;
-                                               SetProperty (property, v);
-                                       }
+                                       GLib.Value v = new GLib.Value ((GLib.GType)value.GetType ());
+                                       v.Val = value;
+                                       SetProperty (property, v);
+                                       v.Dispose ();
                                } else
                                        throw new PropertyNotFoundException ();
                  }