Dialog Memory Issues



Greetings,

I am having a problem with dialogs leaking memory in my
GNOME program.  I am not using modal dialogs, so to
ensure that only one can exist at a time, I use the following
code:

static GtkWidget *dialog;

if (dialog != NULL) {
	gdk_window_show(dialog->window);
	gdk_window_raise(dialog->window);
}
else {
	dialog = gnome_dialog_new()
	...
}

I connect to the 'close' event of the dialog, and the
signal handler simply executes gtk_widget_destroy on the
dialog.

The problem is that every time I create this dialog in my
program and then destroy it, my program uses another 4k
of memory, according to the GNOME system monitor.  The
memory doesn't seem to get freed ever, even though control
is passing through the 'close' signal handler and 
gtk_widget_destroy is being executed on the dialog.

The crazy thing is that this same behavior occurs when I
run the sample GnomeHello program, and repeatedly
open and close the About dialog.  Each time, 4k is added
to the total memory use, and not freed.  Eventually, this
crashed the GNOME Task List and Pager applets.

I am runnning the newest Helix Gnome packages.

Any help would be greatly appreiated.


Jamie Squires




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