imagedestroy() frees any memory associated with image image. image is the image identifier returned by the imagecreate() function.
ImageDestroy() frees any memory associated with image im. Im is the image identifier returned by the ImageCreate() function.