dmi_destroy

Synopsis

#include <opendmi/context.h>

void dmi_destroy(dmi_context_t *context);

Description

The dmi_destroy function closes the context if it is open, see dmi_close, clears its error queue, and frees it along with everything it holds.

Everything taken from the context refers to freed memory afterwards: its registry and the structures it holds, the strings and the binary data they refer to, and the errors taken from its queue. The logging handler given with dmi_set_logger belongs to the caller, and is left as it is.

Parameters

context

Context to destroy, or nullptr, which is ignored.

Errors

None.

See also