# Synopsis

PDX_MSGT mda_Free(long option, void *ent, void *ptr)

# Purpose

Free a memory block.

# Description

The block of memory referenced by ptr is freed for re-use. The block must be allocated using one of mda_Malloc, mda_Realloc, mda_Calloc, or mda_Strdup. Blocks allocated with mda_MallocArray, mda_ReallocArray, or mda_CallocArray must be freed with mda_FreeArray. If the memory has been associated with an entity (i.e. either the ent argument was not NULL when the memory was originally allocated or mda_AddMemory has been called), then the entity which owns the memory must be passed in ent. If the memory has not been associated, ent must be specified as NULL.

# Input

## option

Options (not used)

## ent

The entity which owns the allocated memory or NULL

## ptr

The pointer to be freed

# Return

MDA error code