Bring back GC and new files for commands

This commit is contained in:
Krzosa Karol
2025-05-05 16:49:28 +02:00
parent 2c29df0171
commit 20422d9023
8 changed files with 103 additions and 93 deletions

View File

@@ -178,6 +178,14 @@ void Dealloc(Allocator alo, T **p) {
alo.proc(alo.object, AllocatorKind_Deallocate, *p, 0);
*p = NULL;
}
#define DeallocEx(alo, p) (alo).proc((alo).object, AllocatorKind_Deallocate, (p), 0);
template <class T>
void Dealloc2(Allocator alo, T *p) {
if (*p == NULL) return;
alo.proc(alo.object, AllocatorKind_Deallocate, *p, 0);
*p = NULL;
}
Allocator GetSystemAllocator();
#define MemoryZero(x, size) memset(x, 0, size)