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)
Usage examples (Cross-references)
- In
Memory.c:158:
if (*zs)
FREE(*zs);
}- In
Io.c:2630:
(void)IntToBytesBE(value, buffer, byte_len);
write_char_internal(o, fmt_info->flags, (const char *)buffer, byte_len);
FREE(buffer);
return;
}- 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
Proc.c:404:
CloseHandle(proc->pi.hProcess);
#endif
FREE(proc);
}- In
Mutex.c:47:
#endif
memset(m, 0, sizeof(SysMutex));
FREE(m);
}
Last updated on