On 5/25/06, Neal Becker <ndbecker2@xxxxxxxxx> wrote:
> I'm confused. I thought it worked like this:
> In python, create an a=A(). Then create a b=B(a). Using
> custodian_and_ward, 'a' will not be deleted as long as 'b' is alive. Then
> c=getA() using return_internal_reference will ensure that 'b' is not
> deleted as long as python holds 'c'. Is this not correct?
Please, read my first post and the answer of David Abrahams.
"a" could be created from C++ and not from Python. In this case boost.python
library does not manage life time of object "a".
I think, that pyplusplus should generate "safe" code, and only after
Also, you can customize the return value policy
C++ Python language binding
C++-sig mailing list