The little program below leaks memory like there is no tomorrow.
it is a pruned down screen saver framework.
Do not run for too long as it will bring you xserver down.

Does anybody have any idea what I might be doing wrong.

--------------------------------------------------------------------
#!/usr/bin/python

import pyglet
import numpy


DIM_X = 600
DIM_Y = 1200

image = pyglet.image.create(DIM_Y+2, DIM_X+2,
                            pyglet.image.CheckerImagePattern())

window = pyglet.window.Window(DIM_Y+2, DIM_X+2)

rgba = "\0" * (4 * (DIM_X+2) * (DIM_Y+2))

@window.event
def on_draw():
    global image
    global rgba

    # comment out any of the two lines below and the leak goes away
    image.get_image_data().set_data('RGBA', 4 * (DIM_Y+2), rgba)
    image.blit(0, 0)

# schedule an empty update function, at 60 frames/second
pyglet.clock.schedule_interval(lambda dt: None, 1.0/60.0)

pyglet.app.run()

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to