From af36fc9c823734cb59d816580cb8babb4698d7b4 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Thu, 22 Jul 2021 15:58:40 -0400 Subject: [PATCH] add TODO for utilSafeFree() --- include/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/util.h b/include/util.h index 3541bdc..3ec7225 100644 --- a/include/util.h +++ b/include/util.h @@ -89,6 +89,9 @@ bool utilMatchPrefix(const char* lhs, const char* rhs, int sz); #define UTIL_ALLOC(len, type) (type *) utilLogAlloc((len), sizeof(type), __FILE__, __LINE__) void* utilLogAlloc(uint item_count, uint type_size, const char* file_name, const int line); +// TODO: replace instances of 'utilSafeFree()' with macro that casts to void +// pointer reference. Can then set the pointer to nullptr in free function +#define UTIL_FREE(mem_ptr) utilSafeFree((void*&) mem_ptr) void utilSafeFree(const void* mem); //-----------------