[cairo] Memory leaks in cairomm

Carl Worth cworth at cworth.org
Mon Jun 12 22:35:37 PDT 2006


On Mon, 12 Jun 2006 22:06:33 -0500, "Jonathon Jongsma" wrote:
>
> It would be helpful if there were a way of determining whether the
> reference count of the underlying object has reached zero and is
> destroyed.  For a cairo_t, destroying the object doesn't set the cr
> pointer to NULL.

Uhm, you're passing cairo a pointer by value. There's nothing it can
do to affect your original pointer.

>                  Does anybody know whether there is any other way of
> determining whether an underlying object has been destroyed?

The only place something like that exists in cairo right now is in the
set_user_data functions of cairo_surface_t and cairo_font_face_t. I'm
not sure if it makes sense to put a set_user_data function on every
reference-counted object, but it would be possible, and would be
sufficient for what you are talking about here I think.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060612/5caca624/attachment.pgp


More information about the cairo mailing list