dmi_resource_close

Synopsis

#include <opendmi/locale.h>

void dmi_resource_close(dmi_resource_t *resource);

Description

The dmi_resource_close function closes a resource package opened by dmi_resource_open, and frees the handle.

Strings looked up in the package are released with it, so every pointer returned for it by dmi_resource_string becomes invalid, and so does the name returned by dmi_get_locale when it is taken from this package.

Thread safety

Open packages are kept in a process-wide list, which the function changes, so it must not be called while other threads may use the library.

Parameters

resource

Resource handle to close, or nullptr, in which case nothing is done.

Return value

None.

Errors

None.