We have 2 large C++ application programs using GTK 2.2.4 which have had persistent problems in running out of memory. We have narrowed the problem down to a small test case, shown below, which consumes all available memory until locking up the system. We run this test case with the free command in another terminal window to show free memory on a half-second cycle, thus: free -o -m -s 0.5 The widget-creation call can be either gtk_fixed_new or gtk_drawing_area_new.
Are we missing something, or is this really a leak as it appears? /* Simple application to demonstrate leak. */ #include "gtk/gtk.h" int main( int argc, char * argv [] ) { // initialize GTK gtk_init(&(argc), &(argv)); while (true) { GtkWidget * pWidget = gtk_fixed_new(); // or gtk_drawing_area_new gtk_widget_destroy(pWidget); while (gtk_events_pending()) { gtk_main_iteration(); } // end while } // end while return 0; } // main
_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list