summaryrefslogtreecommitdiff
path: root/gstreamer-sharp/Structure.custom
diff options
context:
space:
mode:
Diffstat (limited to 'gstreamer-sharp/Structure.custom')
-rw-r--r--gstreamer-sharp/Structure.custom8
1 files changed, 6 insertions, 2 deletions
diff --git a/gstreamer-sharp/Structure.custom b/gstreamer-sharp/Structure.custom
index 43af59d..1a3d930 100644
--- a/gstreamer-sharp/Structure.custom
+++ b/gstreamer-sharp/Structure.custom
@@ -158,7 +158,9 @@ public object Get (string field) {
}
public void Set (string field, object value) {
- SetValue (field, new GLib.Value (value));
+ GLib.Value v = new GLib.Value (value);
+ SetValue (field, v);
+ v.Dispose ();
}
public void Set (params object[] fields) {
@@ -171,7 +173,9 @@ public void Set (params object[] fields) {
if (fields[i].GetType () != typeof (string))
throw new ArgumentException ();
- SetValue (fields[i] as string, new GLib.Value (fields[i+1]));
+ GLib.Value v = new GLib.Value (fields[i+1]);
+ SetValue (fields[i] as string, v);
+ v.Dispose ();
}
}