Gtk2::Gdk::Pixbuf::render_pixmap_and_mask leaks X memory ?



It seems the render_pixmap_and_mask function from Gtk2::Gdk::Pixbuf is
leaking. Repetitive call to it cause the X server memory usage to grow.
Am I missing something ?

I found a work around using render_threshold_alpha and
render_to_drawable that doesn't cause X memory usage to grow, but as
they need an already existing pixmap and bitmap I need to create empty
ones, and so it takes 4 complex instructions to replace this simple
one. :(

test case :

#!/usr/bin/perl
use strict;
use warnings;

use Gtk2 "-init";

my $pb=Gtk2::Gdk::Pixbuf->new_from_file("file.jpg");
Glib::Timeout->add(100,\&do);

Gtk2->main;

sub do
{       my ($pixmap,$mask)=$pb->render_pixmap_and_mask(1);
        print STDERR ".";
}

__END__

Quentin




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