Jump to content

Imagedestroy Question?


bilis_money

Recommended Posts

hi, php people.

I'm just curious to know with the imagedestroy() function.
Why is it after we made the image using imagecreate() function.
we need to destroy it again? Is this because it occupy memories on our computer?
and to free it from wasting the memory we need to destroy the image again?

Is this only the reason? or there are another reasons?

Thanks in advance for your comments and opinions... :)
Link to comment
Share on other sites

From what I have read about the topic, you must use imagedestroy() or it can eat up all the memory your host allows very quickly. And that calling the image variable a second time does not clear the old data out of memory it just stays there. So you must use imagedestroy() for that reason or you will meet the max memory limit your host has set in the php.ini.

You can read more about this here: [a href=\"http://www.php.net/imagedestroy\" target=\"_blank\"]http://www.php.net/imagedestroy[/a]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.