[cairo] possible bug in cairo_font.c

Carl Worth cworth at east.isi.edu
Mon May 3 03:31:25 PDT 2004


On Sat, 01 May 2004 15:31:42 -0400, John Ellson wrote:
> In cairo_font.c at line #72 in function _cairo_font_copy it reads:
> 
>     newfont->refcount = 1;
> 
> Shouldn't that be:
> 
>     newfont->refcount += 1;

No.

_cairo_font_copy is allocating new storage for a copy of the font. It's
not sharing storage and taking a reference.

-Carl





More information about the cairo mailing list