[C++-sig] memory leaks using the "manage_new_object"return policy...

David Abrahams dave at boost-consulting.com
Mon Sep 18 23:20:34 CEST 2006


Kevin Jones <investtcartier at yahoo.com> writes:

> One direct solution is the use of Purify which I get access next week. Another
> consideration, is that when I changed the return policy to "return_by_value" the
> same leak behavior was exhibited (N.B. - I call the python garbage collector
> explcitly for each object).  Presumably, boost.python would delete an object
> that it was converting to python as it would definitely be garbage otherwise.
>
> I will work on the small test case.

The lack of
http://boost.org/libs/python/todo.html#pyfinalize-safety
can lead to symptoms that look like leaks.  You can't expect to start
and stop the python interpreter during a single process.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list