blob: ad0176ed402a246a7bb6491c44fab56683b49256 [file] [log] [blame]
Wenzel Jakob5f218b32016-01-17 22:36:39 +01001from __future__ import print_function
2import sys
3import gc
4sys.path.append('.')
5
6from example import Parent, Child
7
8if True:
9 p = Parent()
10 p.addChild(Child())
11 gc.collect()
12 print(p)
13 p = None
14
15gc.collect()
16print("")
17
18if True:
19 p = Parent()
20 p.returnChild()
21 gc.collect()
22 print(p)
23 p = None
24
25gc.collect()
26print("")
27
28if True:
29 p = Parent()
30 p.addChildKeepAlive(Child())
31 gc.collect()
32 print(p)
33 p = None
34gc.collect()
35print("")
36
37if True:
38 p = Parent()
39 p.returnChildKeepAlive()
40 gc.collect()
41 print(p)
42 p = None
43
44gc.collect()
45print("")
46print("Terminating..")