[issue3139] bytearrays are not thread safe

Antoine Pitrou report at bugs.python.org
Wed Aug 13 23:12:31 CEST 2008

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

> In any case, the corresponding DECREF *does* exist: in memory_dealloc,
> PyBuffer_Release is invoked, which releases the reference.

I'm a bit confused. In the PyBuffer_Release implementation you
committed, there is no DECREF at all.

> > By the way, perhaps PyBuffer_Release should set view->obj and view->buf
> > to NULL (and view->len to -1?), it would be a simple way to signal that
> > the buffer can't be used anymore.
> That can be done; it's again a separate patch.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list