mem leaks in file_selection widget for gtk 2.x
- From: Ed Sweetman <ed sweetman wmich edu>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: mem leaks in file_selection widget for gtk 2.x
- Date: 22 Mar 2002 16:07:28 -0500
I use memprof to look for mem leaks in my gtk programs. I notice with
gtk2 my program continually eats more and more memory just by moving
through directories in the file selection menu. With the exact same
code in gtk 1.2, i see absolutely no memory being eaten. My program in
gtk 1.2 _never_ uses more than 512K of ram. My program in gtk 2.x
begins at 1MB of ram and continues to eat more the more I travel through
directories and select files. Also, it doesn't seem to be clearing
memory for destroyed widgets (or it's somehow adding to my pixmaps
instead of overwriting).
Each time my program, mp3stat, selects a file, memory should be taken up
by the program, and then freed, bringing it back to the level it started
out at giving a net memory gain of 0 no matter how many times you select
files.
In gtk 1.2 I observe this perfectly.
In gtk 2.0 (from debian unstable) I see a mem leak because very little
memory is freed and much more memory is eaten each selection. I can
watch the memory go up as i scroll through directories and I watch the
memory release when the file is finished being rendered at a higher
level than when it started out at.
The code is identical for gtk 1.2 and gtk 2.x.
Anyone wishing to check the code to make sure i'm not missing something
needed to stop gtk from endlessly consuming memory can get it at
http://safemode.homeip.net/mp3stat_2.5.5.tar.gz
Sorry if this is a debian pkg only problem.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]