Re: Why do a gtk/directfb process grows bigger and bigger ?
- From: "Kalle Vahlman" <kalle vahlman gmail com>
- To: "Attilio Fiandrotti" <attilio fiandrotti gmail com>
- Cc: Loïc Minier <lool+debian via ecp fr>, gtk-devel-list gnome org
- Subject: Re: Why do a gtk/directfb process grows bigger and bigger ?
- Date: Mon, 18 Dec 2006 14:13:20 +0200
2006/12/18, Attilio Fiandrotti <attilio fiandrotti gmail com>:
Attilio Fiandrotti wrote:
> Hi
>
> I recently noticed the the size of a generic gtk/dfb application
> considerably grows over time while the same application, but compiled
> for gtk/x11, does not.
>
> The attached example aplication permanently sets up a window and an
> external box and at every proram's iteration a textview is created,
> packed into the external box and then destroyed.
>
> Compiling for gtk/x11, the total amount of memory allocated by the
> process remains constant, while under gtk/dfb the process image size
> grown of some tens of KB every 3 or 4 iterations.
>
> I wonder what's the reason of this difference: am i doing something
> wrong when i gtk_widget_destroy() the textview ? Is gtk/dfb leaking
> somewhere ?
I would say yes, calling gtk_container_remove() on it is the way you
are supposed to take a widget from a container. Removing a widget from
its container will decrease the refcount of the widget to 0 and thus
destroy it (unless reffed by someone else of course). Now, it _should_
work both ways, but I think the expected method is worth the trouble
to at least test whether it fixes the bug (no high hopes for that to
happen though, since removing from the container is a part of the
destruction process. But you never know! ;).
--
Kalle Vahlman, zuh iki fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]