Re: [gtk-list] More memory stuff with some interesting output
- From: Havoc Pennington <hp redhat com>
- To: David Allen <opop erols com>
- cc: GTK+ List <gtk-list redhat com>
- Subject: Re: [gtk-list] More memory stuff with some interesting output
- Date: Tue, 27 Jul 1999 21:08:25 -0700 (PDT)
On Mon, 26 Jul 1999, David Allen wrote:
>
> Gtk-CRITICAL **: file gtkmain.c: line 534 (gtk_main_quit): assertion `main_loops != NULL' failed.
> (Comment - I'm guessing this happened because I cheated gtk out of getting
> to deal with any signals and so on - normally it doesn't happen when I do
> things between gtk_init and gtk_main_quit)
>
This is because gtk_main() and gtk_main_quit() have to come in pairs, you
can't quit main if you never enter it.
> ca 42k of unfreed memory??? When I run the whole application without just
> making it take a dive right after it starts up like I did above, it ends up
> with 300k unfreed memory. Some of that may be me, but I've checked through
> many times, and I'm thinking most of it is gtk+
Gtk and glib allocate a bunch of stuff that's supposed to exist for the
entire life of the program (such as the list of GdkVisual, the global
signal table, etc.), and they also cache memory chunks that are never
freed. So that's what you're seeing. There's no way to make glib/Gtk free
this stuff; it does get freed by the operating system on program exit,
after your last g_mem_profile(), of course.
Thanks for the more specific information, I hope this is a more specific
answer.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]