[cairo] Memory leaks in cairomm

Murray Cumming murrayc at murrayc.com
Wed Jul 12 09:07:23 PDT 2006


On Mon, 2006-06-12 at 22:35 -0700, Carl Worth wrote:
> [snip]

> 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.

It's not quite the same thing, but it actually be nice to associate an
extra void* with every cairo object. Then we could make sure that we
instantiate the same C++ object for each C object, so for instance,
after

CppObject* a = something.get_thing();
CppObject* b = something.get_thing();

(a == b) would be true.


GTK+/glib allows this via g_object_set_data(), and libxml has a void*
struct field for it.

But it's not really that important, and I guess it would break ABI.

-- 
Murray Cumming
murrayc at murrayc.com
www.murrayc.com
www.openismus.com



More information about the cairo mailing list