pyPango

Jeffrey Britton <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAJTKU_isXZk_NzVF_R2CQ7jpDChgkCWjPAocB_e=r67iAZrQBg@mail.gmail.com>
There is a severe memory leak in pyPango create_layout()
I found a prior post about this on the pyGtk mailing list in July 2010 by
Cladio Cilloni.

import pango
import cairo
import pangocairo

surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 400, 300)
cr = pangocairo.CairoContext(cairo.Context(surface))
for i in xrange(500000):
    layout = cr.create_layout()
    cr.show_layout(layout)

I am running this on Windows.
I installed
pygtk-all-in-one-2.24.0.win32-py2.7.msi
cairo.version = 1.8.10
pango.version() = 12803

Does anybody know if this is a bug in the Python binding or if it is a bug
in the 'C' version of Pango or if is Windows specific?
Is there a place where I should report the bug?
Is there a different mailing list I should be posting this on?

If i move create_layout() out of the loop the problem goes away for the
most part.
Can I create the layout just once and then use the following as necessary
layout.set_text()
cr.update_layout()
cr._show_layout()




Thanks.

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.