Re: gtk_widget_destroy memory leak



Perhaps Question 1.5 in

    http://www.gtk.org/api/2.6/gtk/gtk-question-index.html

might help?

Ed J.


2008/9/11 Guoling Gao <gguoling gmail com>
Hi,
I see memory usage is biger and biger during the same code running:
int main(int argc, char* argv[])
{
    gtk_init(&argc, &argv);
   
    GtkWidget* window;
   
    while (TRUE)
    {
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);   
        gtk_widget_set_app_paintable(window, TRUE);
        gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
        gtk_window_set_keep_above(GTK_WINDOW(window), TRUE);
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_widget_set_size_request(window, 200, 200);
        gtk_widget_realize(window);
       
        gtk_widget_destroy(window);
    }
   
    gtk_main();
    return 0;
}
 
If there are bugs in gtk_widget_destroy? It sames that the memory is not freed.
Wants help.

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




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