RE: Memory leaks and destruction of widgets
- From: "Ian King" <king eiffel com>
- To: "Havoc Pennington" <hp redhat com>, "Paul Davis" <pbd Op Net>
- Cc: "GTKLIST" <gtk-list gnome org>
- Subject: RE: Memory leaks and destruction of widgets
- Date: Thu, 2 Aug 2001 11:26:21 -0700
>The idea is that you have one GtkTooltips object for all your
>widgets. So you just free it when you free the toplevel application
>window or whatever.
>Havoc
This really is not practical in most applications that display more than
just a helloworld message :) We have a graphical debugger that is creating
hundred of widgets on every debugging step, the memory that is consumed by
just by the tooltips can be quite large, so the tooltips do really need to
be removed once the widget is no longer needed. It seems to me that there
should have been a gtk_widget_set_tooltip as generally most widgets only
have one tooltip associated with it. If this ever needs to be changed then
you reset the tooltip. With the current way of doing things you can have a
tooltip associated to a widget that no longer exists, which is of course
bad. This is not immediately obvious to most people that you have to
explicitly remove the tooltip if you want this memory reclaimed, exemplified
by a response to my previous message.
I really need to know if there are any other cases/scenarios such as this
where I have to call a function to release some memory due to a previous
action. I am getting memory leaks due to the creation, usage and disposal
of some widgets (either gtkpixmaps, gtkmenuitems, or gtklistitems). The
application I am trying to debug is huge and it is not easy finding where
the leak is.
Thanks for your time
Ian King
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]