mammique wrote:

Hi,

i'm trying to make a litte function wich changes randomly a
gtk.Pixmap(pixmap, mask). But each time i call this function the program
takes more and more system memory, until system or X-server dies. What
do i do wrong for a such thing to happen ?

def switch(self, widget):
images = ['1.png', '2.png', '3.png']
self.pixbuf = gtk.gdk.pixbuf_new_from_file(
images[random.randint(0, 2)])
pixmap, mask = self.pixbuf.render_pixmap_and_mask()
self.pixmap.set(pixmap, mask)


Maybe this entry in the FAQ might help:

http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq08.004.htp <http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq08.004.htp>

John

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to