pyo3/newsfragments/3871.added.md
Juniper Tyree 885883bf68
Add Py::drop_ref method (#3871)
* add Py::drop_ref method

* add changelog entry

* fix ffi import

* integrate review feedback

* Add a test

* Fix some build errors

* Fix some more build errors
2024-02-21 22:56:03 +00:00

126 B

Add Py::drop_ref to explicitly drop a `Py`` and immediately decrease the Python reference count if the GIL is already held.