[C++-sig] Re: Boost.Python and C++ side garbage collection

David Abrahams dave at boost-consulting.com
Fri Nov 19 18:12:20 CET 2004


"Arthur Peters" <amp at singingwizard.org> writes:

> Hello,
>
> Straight to the question:
>
> Is there a way to have Booth.Python or python keep a pointer to the C++
> object in memory (as a pointer, not a string or other representation)
> while the Python object wrapping it exists?

It already does that, except in the default case where the C++
object's storage is actually embedded in that of the Python object.
The pointer is kept in the memory occupied by the Python object.

> This may be a silly question. I don't know the internals of Boost.Python
> or python well.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com




More information about the Cplusplus-sig mailing list