Ref
Static reference table keyed by uuid. add(a, b) a references b drop(a, b) drop that reference without deleting b remove(a, b) drop that reference; delete b when nothing references it anymore count(b) how many objects still reference b get(b) what b references, and what references b
Methods
template<typename Ta, typename Tb> static void add(Ta* a, Tb* b)
Records that a references b
| a | Object that holds the reference | |
| b | Object being referenced |
template<typename Ta, typename Tb> static void drop(Ta* a, Tb* b)
Drops the reference from a to b without deleting b
| a | Object that holds the reference | |
| b | Object being referenced |
template<typename Ta, typename Tb> static void remove(Ta* a, Tb* b)
Drops the reference from a to b. Deletes b when nothing references it anymore.
| a | Object that holds the reference | |
| b | Object being referenced |
template<typename T> static u32 count(T* b)
Counts how often b is still referenced
| b | Object to query |
template<typename T> static Info get(T* b)
Returns what b references and what references b
| b | Object to query |
Properties
| objects | hash<string,void * > | uuid |
| refs | hash<string,set |
uuid |