[C++-sig] Ownership question.

David Abrahams dave at boost-consulting.com
Sun Apr 27 12:21:59 CEST 2003


Nicodemus <nicodemus at globalite.com.br> writes:

> tALSit de CoD wrote:
>
>> I have a class method that takes ownership of the object passed into
>> it, and I want to know, how do I let boost.python know about this
>> and not to manage that object anymore?

<snip>

> Unfortunately, I don't think you will get a "nice" way to acomplish
> this, because of how garbage collection works in Python. 

Not so fast!  See the FAQ:
http://www.boost.org/libs/python/doc/v2/faq.html#ownership

always-check-the-faq-first-ly y'rs,
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list