diff --git a/ChangeLog b/ChangeLog index 85f90f032..66dbc8fb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-11 Mike Kestner + + * glib/Object.cs : mark Dispose virtual. + * gtk/Object.cs : release the Destroy handler in Dispose. + 2005-05-11 Mike Kestner * configure.in.in : s/-g/-debug diff --git a/doc/en/Gtk/Object.xml b/doc/en/Gtk/Object.xml index 4f904b875..295b3d89e 100644 --- a/doc/en/Gtk/Object.xml +++ b/doc/en/Gtk/Object.xml @@ -451,5 +451,17 @@ The object is only destroyed if all the references to the object are released, t + + + Method + + System.Void + + + + Disposes the object's resources. + + + - \ No newline at end of file + diff --git a/glib/Object.cs b/glib/Object.cs index 93b6b0531..09fa82efd 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -72,7 +72,7 @@ namespace GLib { return false; } - public void Dispose () + public virtual void Dispose () { if (disposed) return; diff --git a/gtk/Object.custom b/gtk/Object.custom index f42479cb7..107e0edbe 100755 --- a/gtk/Object.custom +++ b/gtk/Object.custom @@ -65,11 +65,15 @@ [DllImport("libgtk-win32-2.0-0.dll")] private static extern void gtk_object_destroy (IntPtr raw); - public virtual void Destroy () + public override void Dispose () { Destroyed -= NativeDestroyHandler; + base.Dispose (); + } + + public virtual void Destroy () + { gtk_object_destroy (Handle); - Dispose (); } public bool IsFloating {