|
|
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
this efficient.
Also, you can customize the return value policy
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
_______________________________________________
C++-sig mailing list
C++-sig@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/c++-sig
|
|