STINNER Victor <vstin...@python.org> added the comment:

I don't want to add a deallocator to bytes and int types to detect when their 
singleton is destroyed, since it would slow down C extensions which have no 
refcount bug. Maybe it could be added only if Py_DEBUG macro is defined. But I 
don't think that Py_DECREF() bugs on these singletons are common enough to 
justify these. I don't want to make Python debug build slower.

IMO detecting refcount bugs on the most common singletons is enough: None, 
True, False, (), "". I implemented these checks because it was simple and had 
no major on performance, even on the debug build.

I now consider that the issue is fully fixed ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45061>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to