Hello,

I maybe didn't express myself well enough. I could understand that a 
reference to an object is taken in order to not have it disappearing 
(/destroyed). But what I actually meant to ask, is : what's the use of 
first adding a reference, (because that's what's happening in my eyes), 
for removing the reference /just the statement after/. Because that's 
what's happening in my understanding.

Beware : I'm not-too-GTK-familiar, so maybe (/probably) I misunderstand 
the meaning of it all.

Kind regards,

PhB

David Nečas (Yeti) wrote:

>On Tue, Nov 28, 2006 at 07:32:14AM +0100, Philippe Bertin wrote:
>  
>
>>In glade_palette_init, there's this piece of code :
>>
>>    /* Add items tray (via a scrolled window) */
>>    priv->tray = gtk_vbox_new (FALSE, 0);
>>    g_object_ref (G_OBJECT (priv->tray));
>>    gtk_object_sink (GTK_OBJECT (priv->tray));
>>
>>What's the goal of this gtk_object_sink?
>>    
>>
>
>I haven't read the code, but probably the vbox can be
>temporarily removed from its container and should not cease
>to exist when this happens so a reference is taken on it.
>  
>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to