Re: Q: gnome-object reference counting



>  A GnomeObject is a GtkObject. Both have reference counting functions:
>  
>  gtk_object_ref | gnome_object_ref (gtk_object_unref | gnome_object_unref)
>  
>  Why do we need both?

A Bonobo object needs reference counting, so that it can be destroyed
at the appropriate time when all clients have released it.  In the
GNOME implementation of Bonobo, this is done with
gnome_object_{ref,unref}().   Remember that Bonobo can be implemented
in any language that has CORBA bindings; for GNOME we just happen to
use C and GTK+ as our internal object system.

The gtk_object_{ref,unref}() functions are completely unrelated to
this.  They just do reference counting for GTK+ objects.

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]