Author: mkestner
Date: 2005-05-10 07:30:12 -0400 (Tue, 10 May 2005)
New Revision: 44325
Modified:
trunk/gtk-sharp/ChangeLog
trunk/gtk-sharp/glib/Object.cs
Log:
2005-05-09 Mike Kestner <[EMAIL PROTECTED]>
* glib/Object.cs : add a try/catch block to g_object_unref calls to
help identify "extra unref" bugs when exceptions occur.
Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog 2005-05-10 11:17:03 UTC (rev 44324)
+++ trunk/gtk-sharp/ChangeLog 2005-05-10 11:30:12 UTC (rev 44325)
@@ -1,3 +1,8 @@
+2005-05-09 Mike Kestner <[EMAIL PROTECTED]>
+
+ * glib/Object.cs : add a try/catch block to g_object_unref calls to
+ help identify "extra unref" bugs when exceptions occur.
+
2005-05-06 John Luke <[EMAIL PROTECTED]>
* pango/Makefile.am: add Matrix.custom
Modified: trunk/gtk-sharp/glib/Object.cs
===================================================================
--- trunk/gtk-sharp/glib/Object.cs 2005-05-10 11:17:03 UTC (rev 44324)
+++ trunk/gtk-sharp/glib/Object.cs 2005-05-10 11:30:12 UTC (rev 44325)
@@ -61,7 +61,12 @@
if (o._obj == IntPtr.Zero)
continue;
- g_object_unref (o._obj);
+ try {
+ g_object_unref (o._obj);
+ } catch (Exception e) {
+ Console.WriteLine ("Exception while
disposing a " + o + "in Gtk#");
+ throw e;
+ }
o._obj = IntPtr.Zero;
}
return false;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches