Re: memory leak with gtk+-2.8.20-r1



On Sun, 06 Aug 2006 09:45:00 +0200
Iago Rubio <iago iagorubio com> wrote:

On Fri, 2006-08-04 at 13:25 +0200, gwenj wrote:
Hello,
I use gtk+ for my soft's graphic interface.
But valgrind make an log file containing approximately 22700 lines for an
simple source code like : 
#include <gtk/gtk.h>

int main(int argc, char **argv) {
    gtk_init(&argc, &argv);
      GtkWidget *win= gtk_window_new(GTK_WINDOW_TOPLEVEL);
      g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(gtk_main_quit), NULL);  
      gtk_widget_show_all(win);
      gtk_main();
      return EXIT_SUCCESS;
}

I've just compiled and run this code snippet with valgrind, and the
results are on my system (Fedora):

ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 12 from 1)
malloc/free: in use at exit: 0 bytes in 0 blocks.
malloc/free: 30 allocs, 30 frees, 1,981 bytes allocated.

It's difficult to write more simple code...

Well if you catch the preprocessor output you'll realize that things are
not always as simpler as they look. Your code grows to 32603 lines
before compilation :)
-- 
Iago Rubio

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Hello,
what is you version of gtk+, glib, glibc and gcc?
Others persons, running Gentoo have the same problem.

Gwenhaël



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