dmi_close

Synopsis

#include <opendmi/context.h>

bool dmi_close(dmi_context_t *context);

Description

The dmi_close function releases the SMBIOS data of the context along with everything decoded from it, and leaves the context closed, so that it may be opened again with dmi_open or dmi_load.

Everything taken from the data refers to freed memory afterwards: the registry and the structures it holds, and the strings and the binary data they refer to. The error queue, the logging handler and the extension modules of the context are kept.

Closing a context which is closed already does nothing.

Parameters

context

Context to close.

Return value

Returns true, or false if context is nullptr.

Errors

None.