Re: Testing for memory leaks in GTK
- From: Tomeu Vizoso <tomeu sugarlabs org>
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Testing for memory leaks in GTK
- Date: Tue, 5 Jan 2010 15:47:11 +0100
On Tue, Jan 5, 2010 at 13:32, Erik de Castro Lopo <mle+gtk mega-nerd com> wrote:
> Hi all,
>
> I have written a small test program that can create independent toplevel
> windows based on a command line parameter. Currently these top level
> windows contain nothing more than a GtkLabel widget and destroy
> themselves using a g_timeout after 30 seconds. When all the toplevel
> windows have been destroyed the program calls gtk_main_quit() and then
> terminates.
>
> When this program is run under valgrind with an increasing number of top
> level windows I notice that number of blocks 'still reachable' when
> the program terminates increases with the number of top level windows
> created:
>
> Created Still reachable
> ----------------------------------------------
> 1 397,039 bytes in 7,739 blocks
> 2 401,271 bytes in 7,786 blocks
> 3 405,111 bytes in 7,826 blocks
> 4 408,271 bytes in 7,847 blocks
> 5 412,399 bytes in 7,899 blocks
>
> Assuming that the bug isn't in my program, doesn't this look like a
> genuine leak that should be fixed?
RefDbg is useful in these cases.
Regards,
Tomeu
--
«Sugar Labs is anyone who participates in improving and using Sugar.
What Sugar Labs does is determined by the participants.» - David
Farning
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]