Browse Source

add TODO for utilSafeFree()

render_group_fix
cinnaboot 5 years ago
parent
commit
af36fc9c82
  1. 3
      include/util.h

3
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);
//-----------------

Loading…
Cancel
Save