Re: Correct use of pixbuf, pixmap, and image?



muppet wrote:

Ari Jolma wrote:
looking at process info, it seems that X is piling up memory, the code
   $self->{pixmap} = $self->{pixbuf}->render_pixmap_and_mask;
   $self->{image}->set_from_pixmap($self->{pixmap});

I've still seem to have a problem with this. I did a bit of research and it seems that GtkImage's set_from_pixmap increases the ref_count of the pixmap, thus the pixmap ends up with two ref_count two (I build NOISY Glib to confirm this) and thus X does not free its memory.

Is there a way to unset the pixmap from the image or force the destroying of the pixmap? Recreating the image at this point in code does not work right away.

Ari




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]