[issue8336] PyObject_CallObject - Not "reference-count-neutral"
Amaury Forgeot d'Arc
report at bugs.python.org
Thu Apr 8 11:57:10 CEST 2010
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
Yes, I think what I wrote above applies here: the string is stored in the "args" variable. When the exception is raised, the traceback contains the *live* frame objects, with position in the bytecode and all local variables. This allows post-mortem debugging, for example.
Try calling PyErr_PrintEx(0) instead of PyErr_Print(), this should clear the exception state without storing it in sys.last_traceback, and the reference will decrease.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8336>
_______________________________________
More information about the Python-bugs-list
mailing list