From e028718bb36a6e629cd6554da0353aba4eee63cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 21 May 2009 20:56:57 +0200 Subject: [PATCH] Remove the managed miniobject instances from the hashtable before unreffing --- gstreamer-sharp/MiniObject.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gstreamer-sharp/MiniObject.cs b/gstreamer-sharp/MiniObject.cs index 2c97f6e830..467231f8f9 100644 --- a/gstreamer-sharp/MiniObject.cs +++ b/gstreamer-sharp/MiniObject.cs @@ -94,13 +94,14 @@ namespace Gst { if (o.handle == IntPtr.Zero) continue; + Objects.Remove (o.handle); + try { gst_mini_object_unref (o.handle); } catch (Exception e) { Console.WriteLine ("Exception while disposing a " + o + " in Gtk#"); throw e; } - Objects.Remove (o.handle); o.handle = IntPtr.Zero; } return false;