From gtk Sun Jul 11 01:17:09 1999 From: Havoc Pennington Date: Sun, 11 Jul 1999 01:17:09 +0000 To: gtk Subject: [gtk-list] Re: Memory leak in Glade output? X-MARC-Message: https://marc.info/?l=gtk&m=93165558603630 On 11 Jul 1999, Anders Melchiorsen wrote: > > gtk_widget_destroy(GTK_WIDGET(window)); > > and this worked flawlessly with previous versions of Glade. Is this no > longer the correct way to close/free the window? > Yes, it is correct. I'm not sure what's going on with Glade, but if you do this then your program is probably right, so you can leave the bug to Glade. Calling gtk_widget_unref() is definitely wrong; the window's ref count is 1, and since it's a toplevel container it will be unref'd during the destroy anyway, so you're doing one too many unrefs (thus the warning). I can't think of why this makes a difference in memory usage, since the refcount reaches 0 either way. Havoc -- To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null