Re: Testing for memory leaks in GTK



Sven Herzberg wrote:

> Can you please post this program, so people can proofread/reproduce what
> you post?

I now have two separate small programs which display this behaviour.

The code can be retrieved use the Bzr revision control tool using:

     bzr get http://www.mega-nerd.com/Bzr/gtk-leak-tests

The code is not visiable at that URL if you go there with a browser,
you need to retrieve it using bzr.

The two programs are:

    00_multiple_toplevel/multiple_toplevel.c
    01_multi_toplevel_w_button/multi_toplevel_w_button.c

There is a single topleve Makefile that builds both programs.

The programs can be run using:

     $program_name <count>

where count is the number of top level windows to create.

There is also a script in the top directory called leak-check.sh which
can run a target test program from one to N times and generated a 
separate (slightly cleaned up) valgrind report log for each N. This
script can be run like eg:

   ./leak-check.sh 0  00_multiple_toplevel/multiple_toplevel

and produce file files vg1-multiple_toplevel.txt, vg2-multiple_toplevel.txt
and so on.

I'd appreciate it if someone could have a look at what I have so far.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


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