memory leak in aggdraw

Alexander 'boesi' Bösecke boesi.josi at gmx.net
Wed Jan 4 05:42:24 EST 2006


Hi

I tried to use the aggdraw module, but ...

With Python 2.4.2 und aggdraw 1.1 the following code produces a memory
leak.
With Python 2.3.5 and aggdraw 1.2a1 it works, but unfortunately on the
effbot-site there is only a version of aggdraw compiled for Python 2.3.

---snip---
import aggdraw

p = aggdraw.Pen((0, 0, 0))
b = aggdraw.Brush((0, 0, 0))
while True:
    draw = aggdraw.Draw('RGB', (100,100))
    draw.rectangle((10, 10, 100, 100), p, b)
---snap---    

If I don't use user-defined pen or brush, it works.
If I put the aggdraw.Draw(...) out of the loop, it works. But
unfortunately I can't change the size of the drawing interface (and in
my real app I'd need that)

My OS is Windows XP.

The best solution would be an aggdraw 1.2a1 build for Python 2.4. But at
least at the moment I'm not able to build it myself. So maybe someone
could provide a work-around for aggdraw 1.1? 


thanks & cu boesi
-- 
<seasons82> was ist rl?
<seasons82> und muss man das wissen?
...der moment wo einem klar wird,
          dass man zuviel chattet...



More information about the Python-list mailing list