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

Roman Yakovenko roman.yakovenko at gmail.com
Thu Sep 14 21:11:14 CEST 2006


On 9/14/06, Kevin Jones <investtcartier at yahoo.com> wrote:
> Hi,
>
> I am using the manage_new_object return policy to wrap
> "newed" C++ object in an effort to conserve memory.
>
> Even though I am deleting the returned object in
> Python and invoking the Python garbage collector I
> still have a leak. This is a long-running systems
> adminstration app the read the contents of a very
> large database.
>
> Any suggestions on how to make manage_new_object
> behave correctly?

May be I can help. I am just going through "same" process. It is up to
you to prove
that boost.python does not free the memory. So if you create small test case
( one cpp, one Python script, Jamfile ) that reproduce the error, I
think you will get the answer\solution to your problem pretty quick.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list