dmi_buffer_destroy

Synopsis

#include <opendmi/buffer.h>

void dmi_buffer_destroy(dmi_buffer_t *buffer);

Description

The dmi_buffer_destroy function frees the buffer and the data it holds.

Everything referring to the data of the buffer, such as the strings and the binary members of the structures decoded from it, refers to freed memory afterwards, so a buffer is destroyed once nothing reads it any more. The buffers of a context are destroyed by dmi_close.

Parameters

buffer

Buffer to destroy, or nullptr.

Errors

None.