Re: Finding a widget in a Glade interface



On Sat, 09 Aug 2008 10:06:57 +0000
dhk <dhkuhl optonline net> wrote:
[snip]
Does anyone have any ideas on how to free the memory correctly?

g_list_foreach() operates on the data held by the list element, not on
the element itself, so your freeGList() function is wrong, even if
freeing the data is correct.

However, if the list elements reference widgets, as I assume, then you
shouldn't be freeing them anyway.  I strongly suspect you should not
even be decrementing the reference count, as I doubt that
gtk_container_get_children() passes over ownership, but inspecting the
source code will reveal that.

Chris



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