p / pycurl-archived

pycurl git import (temporary)
GNU Lesser General Public License v2.1
2 stars 6 forks source link

Keep the default user agent around #37

Closed op closed 11 years ago

op commented 11 years ago

Nice to see that pycurl lives again! Here's a patch I submitted to Debian[1] too.

[1] http://bugs.debian.org/709226

p commented 11 years ago

Can you check if #35 fixed the memory leak please?

op commented 11 years ago

35 should fix the leak, thanks!

p commented 11 years ago

This PR allocates memory that is assigned to a static variable and is never freed. I have not researched what global_cleanup does but perhaps that is the appropriate place to free the allocated memory.

Without the freeing, the memory may be considered "leaked" by various tools.

And now we are talking about a performance optimization for the single malloc.

p commented 11 years ago

A simpler implementation that performs no heap memory allocation is #39. But it requires that LIBCURL_VERSION be a compiler #define, if it ever changes to a variable libcurl will break.

op commented 11 years ago

That looks very similar to the original change.