[cairo] cairo_font_face_t not freeing
psychon at znc.in
Wed May 3 15:55:51 UTC 2017
On 02.05.2017 03:11, Louis M wrote:
> The problem is: I don't know what I didn't freed, but at the end (in the
> 'printf'), I get a reference count of 'font_face' of 1. Just to be sure
> that it is not memory garbage after the 'cairo_font_face_destroy' where
> the 'font_face' could be not valid anymore, I tried to put the same
> 'printf' before the line with the 'cairo_font_face_destroy' and I got 2.
> So, I'm probably missing something, but I don't know what. I don't want
> to actually adding another 'cairo_font_face_destroy' without actually
> knowing why I need it. Can somebody help me.
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.
Who needs a ~/.signature anyway?
More information about the cairo