| 1230 | |
| 1231 | # Test leaks |
| 1232 | class Counted(object): |
| 1233 | counter = 0 # counts the number of instances alive |
| 1234 | def __init__(self): |
| 1235 | Counted.counter += 1 |
| 1236 | def __del__(self): |
| 1237 | Counted.counter -= 1 |
| 1238 | class C(object): |
| 1239 | __slots__ = ['a', 'b', 'c'] |
| 1240 | x = C() |
no outgoing calls
searching dependent graphs…