Pango/PangoCairo function calls leaks Python refcounts
I have identified four calls to Pango and PangoCairo that leaks refcounts.
PangoCairo.context_set_font_options()
, PangoCairo.update_context()
, PangoCairo.show_layout()
, and
Pango.Layout.get_pixel_extents()
refcount.py can be executed with a python-dbg
interpreter. The output indicates that each of the call leaks one refcount. E.g. running with
>>> python-dbg refcount.py -i 1000
...
Growth after 1000 cycles: Max RSS: 0 kB, Python objects: 0, Ref count: 4000
Unacceptable refcount growth detected.
[53619 refs]
which indicates that 4 refcounts are leaked every iteration.
I have run this with the regular python interpreter with 1 million iterations, and not seen any actual memory increase, just refcount leaking.
OS: Ubuntu Xenial, Python: 2.7.12, gi.version_info = (3, 20, 0), Pango: 1.38.1
Edited by Ghost User