mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
* Add a shutdown method to internals. shutdown can safely DECREF Python objects owned by the internals. * Actually free internals during interpreter shutdown (instead of after) * Make sure python is alive before DECREFing If something triggers internals to be created during finalization, it might end up being destroyed after finalization and we don't want to do the DECREF at that point, we need the leaky behavior. * make clang-tidy happy * Check IsFinalizing and use Py_CLEAR, make capsule creation safe if the capsule already exists. * oops, put TLS destructor back how it was. * Oops, proper spelling of unstable _Py_IsFinalizing * Add cleanup step to CI workflow Added a step to clean out unused files to save space during CI. * Accept suggested comment * Avoid recreating internals during type deallocation at shutdown. --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>