On Tue, August 15, 2006 5:45 am, Tom Chubb wrote: > I know this will be really simple, but I'm struggling to get my head > round > the use of imagedestroy() > I have some code which uploads an image, resizes to create a smaller > image > and thumbnail then deletes the source image. > My question is which images need to be destroyed? Probably none. imagedestroy() just frees up the RAM in PHP that the image is taking up. If your script is about to end, imagedestroy() is gonna be moot, as ALL the RAM is going to be freed up. You *CAN* imagedestroy() both the orignal and the thumbnail as you finish each of your three images, if you are short on RAM, or just want to be extra squeaky clean. In no case, however, would it be $targetfile in your code. imagedestroy($target_pic); would make sense. imagedestroy($target_id); would make sense. You can only imagedestroy() the thing that comes back from: $destroyable = imagecreate...(); -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php