Skip to main content

MbufFree

Free a data buffer or container.

Syntax

void MbufFree(
AIL_ID BufOrContainerBufId //in
)

Description

This function deallocates a previously allocated data buffer or container. The memory reserved for the specified buffer or container is released.

Note: All of a container's components are freed automatically when the container is freed. You can also free components manually using MbufFreeComponent. MbufFree cannot be used to free buffers that are components.

Before freeing a parent buffer or container, you must free all of its children.

Note that LUT buffers, once associated with another buffer, a digitizer, or a display, should either be disassociated before being freed, or freed after the associated buffer, digitizer, or display is freed.

To disassociate a digitizer or display from a LUT buffer, use MdigControl with M_LUT_ID set to M_DEFAULT or MdispLut with M_DEFAULT respectively. To disassociate another buffer from a LUT buffer, use MbufControlwith M_ASSOCIATED_LUT set to M_DEFAULT.

All buffers and containers allocated on a particular system must be freed before the system can be freed, unless M_UNIQUE_ID was specified during allocation.

Parameters

BufOrContainerBufId (in, AIL_ID)

Specifies the identifier of the data buffer or container to deallocate.

Copyright © 2026 Zebra Technologies.