diff --git a/ChangeLog b/ChangeLog index 8f521d7fd..b62017718 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-09 Mike Kestner + + * 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 * pango/Makefile.am: add Matrix.custom diff --git a/glib/Object.cs b/glib/Object.cs index e9152c8a7..93b6b0531 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -61,7 +61,12 @@ namespace GLib { 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;