[cairo] Re: cairo_ft_font_destroy missing in CVS?
graydon hoare
graydon at redhat.com
Fri Oct 22 14:59:37 PDT 2004
Ned Konz wrote:
> Since cairo_ft_font_create() does a malloc, it seems like this would be a good
> thing to have.
>
> Is someone working on it?
cairo_ft_font_create is a special way of acquiring one of the general
cairo_font_t objects. the resource it returns is managed by refcount,
like any other font; you decrement that refcount with
cairo_font_destroy. when the refcount drops to zero, a backend function
is called (_cairo_ft_font_destroy, note leading underscore) which
subsequently drops a reference to an entry in a shared pool of freetype
resources. when those references drop to zero _destroy_font_val finally
disposes of the freetype resource.
many layers of caching, I know. but you shouldn't need to look beyond
cairo_font_destroy as a user.
-graydon
More information about the cairo
mailing list