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

Re: gtk_container_remove



Emmanuel DELOGET wrote:

>     So you have your remove code:
> 
>             gtk_widget_ref(w);
>             tag_removed_widget(w);
>             gtk_container_remove(c, w);
> 
>     and you add count
> 
>             gtk_container_add(c, w);
>             if (widget_has_remove_tag(w))
>                 gtk_widget_unref(w);
>     Emmanuel
> 

Ok, thanks. This is a bit of an overkill for what I need, as all I need
to do is ref the widget at the start of the program, and not worry about
it (the UI widgets that I need this for frequently swap, and  are
required for the duration of the program as it is).

Along related lines, if I unref a widget, and that unref'ing takes the
ref count to 0, does gtk automatically remove the widget (and any
widgets packed within that widget) from memory?

Cheers

-- 

Jamie Love
  jlove@clear.net.nz
  jdl28@student.canterbury.ac.nz



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