Message244743
| Author |
petr.viktorin |
| Recipients |
ncoghlan, petr.viktorin |
| Date |
2015年06月03日.13:21:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1433337661.83.0.639894570386.issue24373@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| 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 |
|