[Gtk-sharp-list] GLib.Object.Dispose questions

Mike Kestner mkestner@speakeasy.net
Thu, 02 Oct 2003 10:02:51 -0500


On Thu, 2003-10-02 at 00:11, Bruno Fernandez-Ruiz wrote:

> Now, my questions are:
> 
> 1. What is the design decision behind making the Dispose () method
> schedule the PerformQueuedUnrefs() for an idle of the gtk_main and not
> just calling g_object_unref when the object is being disposed?

The GC runs in a different thread, and changes to the gui have to come
from a single thread.

> 2. The header of Object.cs has a TODO:
> // TODO:
> //   Could remove `disposed' for a check if an object is on the
> dispose_queue_list.
> //
> what is dispose_queue_list? I looked into the public g_object API, but
> could not find anything.

That's probably left over from an earlier implementation.

-- 
Mike Kestner <mkestner@speakeasy.net>