Function rerun_bindings::python_bridge::flush_garbage_queue

source ·
fn flush_garbage_queue()
Expand description

Flushes the GARBAGE_QUEUE, therefore running all the associated FFI release callbacks.

Any time you release the GIL (e.g. py.allow_threads()), try to slip in a call to this function so we don’t accumulate too much garbage.