pub unsafe fn yaml_free(ptr: *mut c_void)Expand description
Free memory allocated by yaml_malloc or yaml_realloc.
This function is a thin wrapper around the system’s free function,
used for freeing memory within the LibYML crate.
§Safety
- This function is unsafe because it directly calls the system’s
freefunction, which can lead to undefined behaviour if misused. - The caller must ensure that the provided
ptris either a valid pointer returned by a previous call toyaml_mallocoryaml_realloc, or a null pointer. - If
ptris a null pointer, no operation is performed.