How to destory GtkWindow without memory leak
- From: Masao Mutoh <mutoh highway ne jp>
- To: gtk-app-devel-list gnome org
- Subject: How to destory GtkWindow without memory leak
- Date: Wed, 19 Jan 2005 02:40:31 +0900
Hi all,
How can I avoid memoryleak the code below?
I want to free the memory for the GtkWindow in each
of the loop.
I noticed to call gtk_widget_show_all() causes the problem,
but I couldn't solve it...
--------
#include <gtk/gtk.h>
int main(int argc, char** argv){
GtkWidget* window;
gtk_init(&argc, &argv);
while(TRUE){
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show_all(window);
gtk_widget_destroy(window);
}
gtk_main();
return 0;
}
--------
Thanks in advance,
Masao
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]