memory problem GdkPixmap
| From: | Stefan Kreuzer | Date: | Thu, 21 Feb 2002 15:21:39 +0000 |
| Subject: | memory problem GdkPixmap | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-1297@lists.php.net to get a copy of this message | ||
Hello all,
I'm working on a viewer program for XPM image files
which are not so easy to view under Win because most
of the image programs aren't able to handle this.
The pixmaps are created and inserted in a CList with the
code below.
<snap>
$pix=Gdk::pixmap_create_from_xpm( $w->window, NULL, $Image_path);
list( $pixmap, $mask) = $pix;
$row = $list->append( array( '', basename($Image_path)));
$list->set_pixmap( $row, 0, $pixmap, $mask);
unset ($pixmap);
unset($mask);
</snap>
After displaying a lot of images, or less but for 3-4 times, or bigger ones,
I get a Windows message which tell me that my system resources are not
enough. Then the application freezes and I need the taskmanager to kill
the app. $pixmap->unref(); doesn't work.
Any idea how to free the memory after displaying the image?
Bye
Stefan