[issue8336] PyObject_CallObject - Not "reference-count-neutral"

Amaury Forgeot d'Arc report at bugs.python.org
Thu Apr 8 09:46:40 CEST 2010


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Indeed, every function of the API is consistent in this aspect, success or failure should not make a difference in reference counts.  Do you have an evidence of the contrary?

Note that it's possible that because of the failure, some argument is stored in an exception (maybe indirectly, through the traceback which contains active frames and their local variables), which increases its reference count. Clearing the exception should release the reference.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8336>
_______________________________________


More information about the Python-bugs-list mailing list