[C++-sig] Memory leak in Boost.python?

Bob Ippolito bob at redivi.com
Wed May 12 02:13:03 CEST 2004


On May 11, 2004, at 4:42 AM, Vianney Lançon wrote:

> I have some memory leak problems with boost python (1.31.0) for 
> interpreter embedding.
>
> My memory leak tracker tells me that some resources allocated in 
> registry.cpp py_function.hpp and function_object.cpp are not freed at 
> the end of the application. There is also some resources allocated by 
> the libPython.
>
> The doc http://www.boost.org/libs/python/todo.html#pyfinalize-safety 
> and some news seem to say that it’s a known problem.
>
> Is there a work around or cvs version or a custom patch that could 
> avoid these leaks?
> Apparently the TODO says that someone is working on it.  Has anyone an 
> idea when this problem will be resolved in stable version?

Is this really a problem for you?  It's just memory that is being 
"leaked", not any sort of persistent resource.  The operating system 
does a much better job at freeing memory than the application can :)

-bob





More information about the Cplusplus-sig mailing list