[issue44562] types.GenericAlias should decref instead of using delete in tp_new
Pablo Galindo Salgado
report at bugs.python.org
Sun Jul 4 14:05:11 EDT 2021
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
> And is is correct to call deallocator for not initialized GenericAlias object?
The correct thing to do is to call Py_DECREF so the object is properly unlinked and the other potential cleanups work. Calling the deallocator directly is almost always dangerous.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44562>
_______________________________________
More information about the Python-bugs-list
mailing list