dmi_entity_destroy

Synopsis

#include <opendmi/entity.h>

void dmi_entity_destroy(dmi_entity_t *entity);

Description

The dmi_entity_destroy function releases all resources associated with the given entity descriptor, including the decoded structure data, the string table, and the entity descriptor itself.

If entity is nullptr, this function does nothing.

If decoded data is present, what it holds is freed before the data itself: first the arrays of the structures the references of the attributes are resolved into, see dmi_attributes_unlink, then whatever the type-specific cleanup handler frees, if one is registered, and last the arrays the fields of the specification are decoded into, see dmi_fields_release.

Parameters

entity

Entity descriptor to destroy, or nullptr.

Return value

None.

Errors

None.