[cairo] Memory issues?

Carl Worth cworth at cworth.org
Wed Apr 12 14:52:11 PDT 2006


On Wed, 12 Apr 2006 11:18:51 +0530, Rajeev wrote:
>
> sending this link where i posted the patch.
> http://rajeevbe.wordpress.com/cairo-patch/

Ouch.

That's a bit too hard for me to read for a couple of reasons:

1. There's no indentation.

   To fix this, you might try something designed for posting code
   snippets such as:

	http://paste.lisp.org/

2. It's really long.

   That's just too much code to dump and ask, "where's my memory
   leak".

   Incidentally, it's quite likely much more code than you want to
   maintain as well. I would recommend looking for common pieces of
   rendering code and putting them into functions for better code
   reuse, readability, and maintainability.

It probably makes sense to reduce the code duplication before chasing
the bugs down more, (since it's not fun having to fix the same bug
more than once). But when you do get back to memory leak hunting, have
you considered using valgrind?

-Carl

PS. If you do find evidence that there is definitely a problem with
cairo itself, (say a minimal test case that demonstrates a leak), then
I am still very interested in seeing it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060412/8bf79bfa/attachment.pgp


More information about the cairo mailing list