[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk
Subject: [gtk-list] Re: Memory leak in Glade output?
From: Havoc Pennington <rhp () zirx ! pair ! com>
Date: 1999-07-11 1:17:09
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic