Re: cairo_font_face_t not freeing

Uli Schlachter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

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.

Cheers,
Uli
-- 
Who needs a ~/.signature anyway?
-- 
cairo mailing list
[email protected]
https://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.