On Wed, Mar 11, 2009 at 11:37 PM, Mattia Barbon <[email protected]> wrote: > Gabor Szabo wrote: >> >> The following script creates a window with a menu. >> When clicking on the File/Run menu option it will destroy and then >> recreate >> some of the menu items several times (100 by default). >> >> As I can see this script leaks memory. >> If I run it as it is it leaks about 20-30 bytes per run. >> If I enabled the event generation code as well which is currently >> commented out then with each run the RES memory will grow by ~ 600 bytes. >> >> Any idea why is that and how could I avoid? >> Do I need to explicitly remove the event handlers? How ? > > How exacty do you mesaure it? I ask because valgrind reports > a lot of potential errors, and I'd like to be sure to know what > to search for.
looking at htop of the process. Gabor
