2005-05-09 Mike Kestner <mkestner@novell.com>

* glib/Object.cs : add a try/catch block to g_object_unref calls to
	help identify "extra unref" bugs when exceptions occur.

svn path=/trunk/gtk-sharp/; revision=44325
This commit is contained in:
Mike Kestner 2005-05-10 11:30:12 +00:00
parent df953a08f7
commit 3a004064f7
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-05-09 Mike Kestner <mkestner@novell.com>
* 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 <john.luke@gmail.com>
* pango/Makefile.am: add Matrix.custom

View File

@ -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;