keep_alive call policy (analogous to Boost.Python's with_custodian_and_ward, fixes #62)

This commit is contained in:
Wenzel Jakob
2016-01-17 22:36:39 +01:00
parent 87187afe91
commit 5f218b3f2c
8 changed files with 208 additions and 4 deletions

25
example/example13.ref Normal file
View File

@@ -0,0 +1,25 @@
Allocating parent.
Allocating child.
Releasing child.
<example.Parent object at 0x10eb726c0>
Releasing parent.
Allocating parent.
Allocating child.
Releasing child.
<example.Parent object at 0x10eb726c0>
Releasing parent.
Allocating parent.
Allocating child.
<example.Parent object at 0x10eb726c0>
Releasing parent.
Releasing child.
Allocating parent.
Allocating child.
<example.Parent object at 0x10eb726c0>
Releasing parent.
Releasing child.
Terminating..