[issue3660] reference leaks in 3.0

Antoine Pitrou report at bugs.python.org
Thu Aug 28 12:14:32 CEST 2008


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

>   str(memoryview(b'character buffers are decoded to unicode'), 'utf-8')
> I tried another patch, but I'm not sure: I get lost between all these
> buffers... a Py_DECREF(self->view.obj) in memory_releasebuf() seems to work.

Could you open a separate issue for the latter? Adding a DECREF in
memory_releasebuf() isn't the right thing to do, because PyBuffer_Release()
already does such a DECREF. I think the problem is rather in memory_getbuf(), it
tries to take some strange shortcuts.

Oh, and I realize that memoryobject doesn't have tp_traverse and tp_clear, which
looks quite wrong...

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


More information about the Python-bugs-list mailing list