diff --git a/ChangeLog b/ChangeLog index b01e9289f..ad317ffd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-11 Miguel de Icaza + + * glib/Object.cs (DisposeNative): Call GC.SuppressFinalize, and + set the obj to null. + 2002-09-11 Rachel Hestilow * glib/Object.cs (Ref): Added. diff --git a/glib/Object.cs b/glib/Object.cs index 25e09f6f8..6f7e0dc11 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -55,13 +55,15 @@ namespace GLib { [DllImport("gobject-2.0")] static extern void g_object_unref (IntPtr raw); - + protected virtual void DisposeNative () { if (_obj == IntPtr.Zero) return; + GC.SuppressFinalize (this); g_object_unref (_obj); + _obj = IntPtr.Zero; } [DllImport("gobject-2.0")]