Skip to content
fn

release_py_object

void release_py_object(int & obj)

Release obj's reference under the GIL if the interpreter is still running. Detaches the underlying PyObject* before Py_DECREF so re-entrant Python finalizers cannot observe a half-cleared handle.