Re: gdk_pixmap_unref in perl-GTK?


On 11 February 2001 17:53, you wrote:

The pixmap is automatically unref()ed when it isn't used anymore, you
should not need to unref it explicitly from perl code.

      undef $pixmap;
Well, maybe I'm overcomplicating things.... But still: gdk_pixmap_unref
is mentioned in gtk-perl code the once: in bg_pixmap function, when
the background pixmap is changed. As I understand, to remove pixmap on
server side one has either to unref it explicitely via XFreePixmap() or
to disconnect from X-server. I create a pixmap with 'new Gtk::Gdk::Pixmap()'
which is mapped to gdk_pixmap_new(). XFreePixmap() is called only from
gdk_pixmap_unref() (at least in gtk+ 1.2.6). I didn't find a destructor for
gdk pixmap in .xs files and gdk_pixmap_unref() in perl-gtk is called only from

Should do the right thing when you are done with it (or just let perl do it
if it's a my var that goes out of scope...). If you think there is some
kind of memory leak, please post more details.
How one can check, which pixmaps exist in X server? Is there a utility to
list an X-server internal objects?

 \   / |                                   |
 (OvO) |  Michael Ivanov                   |
 (^^^) |      Voice:   +7 (812) 328-1907   |
  \^/  |      E-mail:  ivans isle spb ru   |
  ^ ^  |                                   |

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