Re: the pros of gtk_debug_shutdown
- From: Skip Montanaro <montanaro tttech com>
- To: Michael Meeks <michael ximian com>
- Cc: Gtk Hackers <gtk-devel-list gnome org>
- Subject: Re: the pros of gtk_debug_shutdown
- Date: Fri, 09 Nov 2001 09:10:40 +0100
Michael> Here are some of the pros and cons of having a _debug_shutdown
Michael> method:
(Once again, I chime in even though I plead ignorance of the source. ;-)
I'm not saying yea or nay on the idea of a debug_shutdown method, just
trying to see if there's a way you can use the facilities gtk currently
provides to see if your applications are leaking.
It seems clear that you can dump out the reference counts at the end of the
program. In the absence of a debug_shutdown method can you perhaps dump the
reference count information immediately after calling gtk_init and then zap
those objects from the dump at the end? Presumably stuff like the root
window wrapper and static GdkVisuals will have been allocated at that point.
Also, if there is a function you can call to dump refcounts during the
program's run, couldn't you call it periodically as well, to see how the
information changes as you perform various actions? If you're leaking
widgets, you should see the number grow (or the reference count of one or
more widgets increase) as the leak-causing action is repeated during what
should be steady state operation.
--
Skip Montanaro (skip pobox com)
http://www.mojam.com/
http://www.musi-cal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]