FREE
- Macro
- August 22, 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
Sys.c:370
:
#endif
memset(m, 0, sizeof(SysMutex));
FREE(m);
}
- In
Sys.c:602
:
DWORD error = GetLastError();
LOG_ERROR("CreateProcess failed with error {}", error);
FREE(proc_info);
return NULL;
}
- In
Sys.c:626
:
free(envp_array);
}
FREE(proc_info);
return NULL;
}
- In
Sys.c:765
:
#endif
FREE(proc_info);
}
- In
Str.c:87
:
ValidateStr(copy);
if (copy->data) {
FREE(copy->data);
}
*copy = StrInit();