void gdFree ( void * ptr )
Frees memory that has been allocated by libgd functions.
Unless more specialized functions exists (for instance, gdImageDestroy), all memory that has been allocated by public libgd functions has to be freed by calling gdFree, and not by free(3), because libgd internally doesn’t use alloc(3) and friends but rather its own allocation functions, which are, however, not publicly available.
ptr | Pointer to the memory space to free. If it is NULL, no operation is performed. |
Nothing.
gdImageDestroy is used to free the memory associated with an image.
void gdImageDestroy ( gdImagePtr im )
Frees memory that has been allocated by libgd functions.
void gdFree ( void * ptr )