FMM: freeing mismatched memory

An FMM message indicates that your program is deallocating memory using a function from a different family than the one used to allocate the memory.

image\fmm.gif

An FMM error can occur when you use new[] to allocate memory and delete to free the memory. You should use delete[] instead, otherwise the destructor associated with the memory cannot be run. Purify reports an FMM message when your program allocates memory from one family of APIs and then deallocates the memory from a mismatching family. Purify checks these families:

new/delete
new[]/delete[]
malloc/free
calloc/free
realloc/free
XtMalloc/XtFree