FREE
- Macro
- October 8, 2025
Table of Contents
FREE
FREE
Description
Safely deallocates memory and nullifies pointer.
Parameters
Name | Direction | Description |
---|---|---|
x | in,out | Pointer variable to free. |
Success
Memory is deallocated and pointer set to NULL.
Failure
Function cannot fail - safe to call with NULL.
Usage example (Cross-references)
- In
Memory.c:158
:
if (*zs)
FREE(*zs);
}
- In
Str.c:88
:
ValidateStr(copy);
if (copy->data) {
FREE(copy->data);
}
*copy = StrInit();
- In
BitVec.c:41
:
ValidateBitVec(bitvec);
if (bitvec->data) {
FREE(bitvec->data);
bitvec->data = NULL;
}
- In
BitVec.c:112
:
if (bv->length == 0) {
// Free all memory if empty
FREE(bv->data);
bv->data = NULL;
bv->capacity = 0;
- In
BitVec.c:1260
:
if (!prev_row || !curr_row) {
FREE(prev_row);
FREE(curr_row);
LOG_FATAL("Memory allocation failed");
- In
BitVec.c:1261
:
if (!prev_row || !curr_row) {
FREE(prev_row);
FREE(curr_row);
LOG_FATAL("Memory allocation failed");
}
- In
BitVec.c:1291
:
u64 result = prev_row[len2];
FREE(prev_row);
FREE(curr_row);
- In
BitVec.c:1292
:
u64 result = prev_row[len2];
FREE(prev_row);
FREE(curr_row);
return result;
- In
Mutex.c:47
:
#endif
memset(m, 0, sizeof(SysMutex));
FREE(m);
}
- In
Proc.c:404
:
CloseHandle(proc->pi.hProcess);
#endif
FREE(proc);
}