template<typename K, typename V, typename HASH = DefaultCompare, typename HANDLER = RefCountHashMapDefaultHandler>
class maxon::RefCountHashMap< K, V, HASH, HANDLER >
Use a RefCountHashMap for cache-like use cases where a map entry shall be automatically removed when it isn't used any longer.
To add an entry to a RefCountHashMap, you have to use and store an EntryRef as in
EntryRef ref;
PyObject * value
Definition: abstract.h:715
PyObject * key
Definition: abstract.h:289
maxon::Bool Bool
Definition: ge_sys_math.h:55
#define iferr_return
Definition: resultbase.h:1519
This will add an entry for key
, and this entry will stay in the map as long as there are EntryRefs pointing to it. The map keeps track of those entries by means of reference counting.