ysnt27 <[email protected]> added the comment:
Thanks for making the issue clear.
My understanding is that,
all C++ destructors have to check Python interpreter before Py_DECREF,
like this.
``` cplusplus
~something() {
// PyThreadState *_tstate = PyThreadState_GET();
PyThreadState *_tstate = _PyThreadState_UncheckedGet();
if (_tstate) {
Py_DECREF(somelist);
}
}
```
Is this right?
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com