[C++-sig] Re: Can anybody tell me the other difference betweenthese 2 little programs?

David Abrahams dave at boost-consulting.com
Thu Sep 11 21:22:45 CEST 2003


"Conan Brink" <conanb at STCG.net> writes:

> The short description is that the second one works because those handles
> all pass out of scope before you call Py_Finalize(), so that
> Boost.Python isn't trying to keep anything alive past the call to
> Py_Finalize().
>
> The solution (until such time as it gets off the TODO list):  Don't call
> Py_Finalize() if you have any Boost.Python objects still alive.

Nor even if you don't.  The library keeps objects of its own alive.

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





More information about the Cplusplus-sig mailing list