This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ysnt27
Recipients ronaldoussoren, ysnt27
Date 2019-11-14.03:07:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1573700868.06.0.0407977339802.issue38609@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2019-11-14 03:07:48ysnt27setrecipients: + ysnt27, ronaldoussoren
2019-11-14 03:07:48ysnt27setmessageid: <1573700868.06.0.0407977339802.issue38609@roundup.psfhosted.org>
2019-11-14 03:07:48ysnt27linkissue38609 messages
2019-11-14 03:07:47ysnt27create