Testing for memory leaks in GTK

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

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          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?

Erik de Castro Lopo

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