[][src]Trait pyo3::freelist::PyClassWithFreeList

pub trait PyClassWithFreeList {
    fn get_free_list() -> &'static mut FreeList<*mut PyObject>;
}

Implementing this trait for custom class adds free allocation list to class. The performance improvement applies to types that are often created and deleted in a row, so that they can benefit from a freelist.

Required methods

fn get_free_list() -> &'static mut FreeList<*mut PyObject>

Loading content...

Implementors

Loading content...