pdfFreeMemory

Free memory allocated by the library.
void pdfFreeMemory(void *ptr)
This function frees memory blocks allocated by the library and returned by various other functions.

It should only be used where the documentation for the function specifically states that it is required.

C:
char *name; int length; name = pdfGetEmbeddedFileName(pdf, i, &length); ... pdfFreeMemory(name);