Re: Pixmap + Memory Problem
- From: Ron Steinke <rsteinke w-link net>
- To: delmano ig com br, gtk-list gnome org
- Subject: Re: Pixmap + Memory Problem
- Date: Thu, 19 Jul 2001 11:53:51 -0700
> From: Emanoel Guimaraes Martins Filho <delmano ig com br>
>
> I'm new in this list. I'm trying to use a big pixmap (640x480) to show some
> estatistics, drawing rectangles and lines in the pixmap. The screen must be
> update each 5 seconds. However, the consume of memory reaches the size of
> the swap after some minutes and the program is aborted.
>
>
>
> Are there a way to free the memory used by the pixmap?
It sounds like what you're doing is using gtk_pixmap_set() to change
the GdkPixmap every update. Is this correct? If so, you need to
unref the GdkPixmap after you add it to the GtkPixmap. The GtkPixmap
will hold a reference to the GdkPixmap, so you can drop the reference
you got when you created it. That way, when you replace the GdkPixmap
in the next update, the old GdkPixmap will be unrefed and destroyed.
Ron
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]