Ronald Oussoren <ronaldousso...@mac.com> added the comment:
You only have to check, using a public API, if you have no control over when C++ objects are destructed. I'd personally try to structure code to make sure that C++ objects owning references to Python objects get destructed before the interpreter is finalised (or release their references). The code you mention is not using a public API, Py_IsInitialized <https://docs.python.org/3/c-api/init.html#c.Py_IsInitialized> is a public API that can be used to check if the interpreter is initialised. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38609> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com