[C++-sig] Custodian & ward

David Abrahams dave at boost-consulting.com
Sat Jun 11 07:49:48 CEST 2005


"Jarno Seppänen" <js.nospam at wolke7.net> writes:

> Hi,
>
> Niall asked:
>> ... and each FXWindow instance maintains a list of its children, and
>> deletes its children when it gets deleted, then how do I apply 
>> custodian & ward to ensure that when the parent instance is deleted, 
>> python knows not to delete the children?
>
> I've experienced the same problems when writing wrappers for LLVM.  My
> conclusion is that BPL doesn't obey with_custodian_and_ward and/or
> return_value_policy in case of constructors.  

What effect do you expect the return_value_policy to have?
The ctor is returning a brand new object every time.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list