Message244743
The example object in the xxlimited module can be part of a reference loop (it can contain itself), so it needs GC and tp_traverse.
The tp_dealloc hook was incorrect, and a correct version would be difficult to generalize for something more complicated than a example class (#16690; [0]). It's better to avoid dealloc and show off tp_finalize.
Same for the class in _testmultiphase (PEP 489 tests), which is based on xxlimited. The incorrect dealloc is causing the reference leak mentioned in #24268.
The Xxo object also wasn't actually added to the module.
Here is a patch to fix these.
[0] https://mail.python.org/pipermail/python-dev/2015-June/140422.html |
|
Date |
User |
Action |
Args |
2015-06-03 13:21:01 | petr.viktorin | set | recipients:
+ petr.viktorin, ncoghlan |
2015-06-03 13:21:01 | petr.viktorin | set | messageid: <1433337661.83.0.639894570386.issue24373@psf.upfronthosting.co.za> |
2015-06-03 13:21:01 | petr.viktorin | link | issue24373 messages |
2015-06-03 13:21:01 | petr.viktorin | create | |
|