[C++-sig] which return policy?

Roman Yakovenko roman.yakovenko at gmail.com
Tue Apr 17 14:52:30 CEST 2007


On 4/17/07, Neal Becker <ndbecker2 at gmail.com> wrote:
> In this:
>
> A free_func (B& b);
>
> Where A is a class that maintains a reference to b,
>
> class_<B> ...
>   .def ("get_A", free_func, return_arg<1>())
>
> Is this the correct return policy?
>
I guess with_custodian_and_ward_postcall:
http://boost.org/libs/python/doc/v2/with_custodian_and_ward.html#with_custodian_and_ward_postcall-spec

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list