Re: stupid question



> I have spent quite some trying to tunderstand why we use everywhere 
> gtk_object_destroy instead of gtk_object_unref.
> 
> (obviously, the GtkSocket in the non-local case does not get 
> unrealized which leaves in the container a window hanging... So, I guess
> that the unref method of the socket does not get called which makes me 
> wonder why no one ever uses gtk_object_unref which supposed to take care 
> of this)
> 
> I wellcome any answer because this _really_ makes me feel stupid.
> I don't understand. What unrefs our GtkObjects ? after the destruction ?

Typically you want to "gtk_objet_destroy" top-level windows, as Gtk+
will keep its own reference to them from somewhere.

For anything else, we must use the _unref versions of those.

> I have spent quite some trying to tunderstand why we use everywhere 
> gtk_object_destroy instead of gtk_object_unref.

Can you tell me where you saw this?

Miguel.




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