[cairo] cairo_font_face_t not freeing

Louis M prog at tioui.com
Wed May 3 17:25:51 UTC 2017

On 05/03/2017 11:55 AM, Uli Schlachter wrote:
> Cairo has a font cache so that it does not have to load the same font
> again and again. If you add a call to cairo_debug_reset_static_data(),
> then you really get Refcount=0 as you expect.
> Cheers,
> Uli
Is there not a dangerous memory leak there? If for example, I have a
function that create a Freetype font face and generate a cairo font face
with it. Then, since the font face will never be freed, I cannot free
the Freetype font face. If I relaunch the function multiple time, new
Freetype font face will be created each time.


Louis M

More information about the cairo mailing list