Vuo 2.4.4
Loading...
Searching...
No Matches
VuoHeap.h
Go to the documentation of this file.
1
10#ifndef VuoHeap_h
11#define VuoHeap_h
12
13#include <stdlib.h>
14#include <stdbool.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
34typedef void (*DeallocateFunctionType)(void *);
35
36void VuoHeap_report(void);
37
49#define VuoRegister(heapPointer, deallocate) VuoRegisterF(heapPointer, deallocate, __FILE__, __LINE__, __func__, #heapPointer)
50int VuoRegisterF(const void *heapPointer, DeallocateFunctionType deallocate, const char *file, unsigned int linenumber, const char *func, const char *pointerName);
51
62#define VuoRegisterSingleton(heapPointer) VuoRegisterSingletonF(heapPointer, __FILE__, __LINE__, __func__, #heapPointer)
63int VuoRegisterSingletonF(const void *heapPointer, const char *file, unsigned int linenumber, const char *func, const char *pointerName);
64
65int VuoRetain(const void *heapPointer);
66
67int VuoRelease(const void *heapPointer);
68
110#define VuoLocal(heapPointer) VuoRetain(heapPointer); VuoDefer(^{VuoRelease(heapPointer);});
111
112bool VuoHeap_isPointerReadable(const void *pointer);
113char *VuoHeap_getDescription(const void *heapPointer);
114void VuoHeap_addTrace(const void *heapPointer);
115
122#define VuoWarnUnusedResult __attribute__((warn_unused_result))
123
130#define VuoIgnoreResult(a) (void)a
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif