[C++-sig] Memory Leaks In VS.NET 2003 With BOOST_PYTHON_MODULE
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Sat Oct 8 01:36:17 CEST 2005
--- Matt <mjkeyes at sbcglobal.net> wrote:
> One more quick note - in doing some google searches on this subject,
> I found a couple of things:
> 1. People were told to ignore the boost memory leaks because modern
> computers can handle it (which sounds like a BAD BAD BAD approach
> to me)
Sounds bad to me, too, but it depends on the context.
> 2. People were told not to call Py_Finalize()
That's correct. Boost.Python doesn't support cleanup for Py_Finalize. Isn't
that documented somewhere? (I never use embedding.)
> Are either of these correct, and can I ignore my Py_Finalize call?
Yes, you have to comment out Py_Finalize.
If you can, make Python the main. IMHO embedding is a plan B.
Yahoo! Mail - PC Magazine Editors' Choice 2005
More information about the Cplusplus-sig