Re: Widget memory allocation




On Mon, 22 Nov 1999, Bjorn Andersson wrote:
> GTK (and gnome). Is memory for widgets automatically freed with
> the parent? When should widgets be freed/destroyed (and how)?
>

Children are destroyed with the parent. See the GTK tutorial or chapter 3
of my book.
 
> Here's an example that leaks about 8KB of memory every time I open
> and close the dialog. Should the dialog be freed? Is it me, gnome
> or something else that is leaking. I am using:

Doesn't look like it should leak. If you're using glibc/Linux, 
try memprof and see if it reports leaks. If memprof doesn't report a leak
then probably you're just using the wrong method to detect leaks. If it
does report a leak, then it will also report where the leak occurred.

memprof: http://people.redhat.com/~otaylor/memprof/

Havoc




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