[issue3651] eval() leaks 1 reference every time

Antoine Pitrou report at bugs.python.org
Sun Aug 24 01:26:45 CEST 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

Hi,

Making Py_buffer INCREF the original object is IMO the right thing to
do, because in most cases letting the original object disappear means
the memory region will become invalid as well. If you don't want the
INCREF, you can pass NULL as the obj parameter to PyBuffer_FillInfo() -
a piece of code in unicodeobject.c does just that.

However, since this decision was made recently (at the same time the s*
format codes were introduced), it is not reflected in the buffer API
documentation.

----------
nosy: +pitrou

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


More information about the Python-bugs-list mailing list