Re: Memory leaks and destruction of widgets
- From: Ralph Walden <rwalden tripos com>
- To: Paul Davis <pbd Op Net>
- Cc: Ian King <king eiffel com>, GTKLIST <gtk-list gnome org>, pygtk <pygtk daa com au>
- Subject: Re: Memory leaks and destruction of widgets
- Date: Thu, 02 Aug 2001 12:32:15 -0500
Paul Davis wrote:
>
> >When a widget is destroyed, it seems that I have to explicitly remove the
> >tooltip set for it to reclaim the memory taken up by the tooltip (by setting
> >with a NULL tooltip). Shouldn't this be done when the widget is destroyed so
> >I don't have to explicitly call this myself?
> >
> >Are there any other `hidden' procedures that I have to go through to ensure
> >that all the memory taken up by the life of a widget is reclaimed, with
> >removing tooltips being one example?
>
> this is not a "hidden" procedure. the tooltip knows about the widget,
> but the widget knows nothing about the tooltip. you associated the
> tooltip with the widget; you get to clean up later. just connect a
> cleanup handler to the "destroy" event for the widget each time you
> make such an "anonymous" association between objects.
>
> --p
>
Yikes! Does anyone know if libglade takes care of this?
Thanks,
Ralph Walden
--
Ralph E. Walden
Tripos, Inc.
rwalden tripos com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]