GNOME Bugzilla – Bug 130880
GtkFileSelection memory leak
Last modified: 2007-01-24 19:07:43 UTC
I executed the code below with memprof. Pressing OK button in the file_selection_dialog force destruction of the old and creation of a new one. The allocated memory keeps growing as shown by memprof, as long as i keep pressing the OK button. This can be related to some memory allocated by the file_selection_dialog code and not freed at dialog destruction. #include <gtk/gtk.h> int main(int argc, char *argv[]) { GtkWidget *dialog; char *pStr; int response; int end=0; gtk_init (&argc, &argv); while(!end) { dialog = gtk_file_selection_new ("Selezione file dati rotaia"); if(dialog) { response = gtk_dialog_run (GTK_DIALOG (dialog)); if (response == GTK_RESPONSE_OK) { pStr=(char *)gtk_file_selection_get_filename (GTK_FILE_SELECTION (dialog)); } else { end=1; } gtk_widget_destroy (dialog); } } }
Setting the priority to "Low" for all bugs related to GtkFileSelection. This has been deprecated in favor of GtkFileChooser.
Moving back to a nearer milestone as a potential memory leak.
Upping priority to normal and pushing to 2.4.2; don't have time to debug it right now.
Mass changing gtk+ bugs with target milestone of 2.4.2 to target 2.4.4, as Matthias said he was trying to do himself on IRC and was asking for help with. If you see this message, it means I was successful at fixing the borken-ness in bugzilla :) Sorry for the spam; just query on this message and delete all emails you get with this message, since there will probably be a lot.
Leaks occurring under 2.6.4 do not seem to occur under 2.8.16. Maybe this should be closed?
Thats odd, I can't think of any changes to the old file selector that would have happened between 2.6 and 2.8 to make it go away.
Necessarily, I also had later versions of dependent libraries i.e. glib 2.6.4 2.8.6 atk 1.8.0 1.10.3 cairo 1.0.3 1.0.4 pango 1.8.1 1.10.4 gtk 2.6.4 2.8.16
Marking as obsolete. The code has changed enough that we need to look for leaks afresh.