38#define REDUCT_GC_RETAIN(_reduct, _handle) \
42 reduct_handle_t __handle = (_handle); \
43 if (REDUCT_HANDLE_IS_ITEM(&__handle)) \
45 reduct_item_t* __item = REDUCT_HANDLE_TO_ITEM(&__handle); \
46 __item->retainCount++; \
56#define REDUCT_GC_RETAIN_ITEM(_reduct, _item) \
60 reduct_item_t* __item = (_item); \
61 __item->retainCount++; \
70#define REDUCT_GC_RELEASE(_reduct, _handle) \
74 reduct_handle_t __handle = (_handle); \
75 if (REDUCT_HANDLE_IS_ITEM(&__handle)) \
77 reduct_item_t* __item = REDUCT_HANDLE_TO_ITEM(&__handle); \
78 __item->retainCount--; \
Core definitions and structures.
REDUCT_API void reduct_gc_if_needed(reduct_t *reduct)
Optionally run the garbage collector if the number of allocated blocks exceeds the threshold.
REDUCT_API void reduct_gc(reduct_t *reduct)
Run the garbage collector.