Re: How to destroy a window?

>I found out that the error occurs because i hadn't unparent the window, but wa
>the window suposed to unparent herself when she is destroyed? (this question i
>for the gtk developer team..)

when you add a widget to a container, then unless you call
gtk_widget_ref() before doing so, you are transferring ownership of
the widget to the container. after that, you are not allowed to
destroy it (or even unref it).

if you wish to keep ownership of your widgets, ref them before adding
them to containers, and unref them to delete them. if they are still
in a container when you unref, they will be deleted when the container
chooses to do so. if they have been removed from the container, the
unref will delete them right there.


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