Function libyml::api::yaml_document_delete
source · pub unsafe fn yaml_document_delete(document: *mut YamlDocumentT)
Expand description
Delete a YAML document and all its nodes.
This function frees the memory allocated for a YamlDocumentT
struct and all its associated
nodes, including scalar values, sequences, and mappings.
§Safety
document
must be a valid, non-null pointer to aYamlDocumentT
struct.- The
YamlDocumentT
struct and its associated nodes must have been properly initialized and their memory allocated correctly. - The
YamlDocumentT
struct and its associated nodes must be properly aligned and have the expected memory layout.