Jump to content


Photo

Imagedestroy Question?


  • Please log in to reply
2 replies to this topic

#1 bilis_money

bilis_money
  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 28 June 2006 - 02:14 AM

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... :)

#2 adamwhiles

adamwhiles
  • Members
  • PipPipPip
  • Advanced Member
  • 54 posts

Posted 28 June 2006 - 04:08 AM

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]

#3 bilis_money

bilis_money
  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 28 June 2006 - 05:59 AM

thank you! adamwhiles.
that's a good advice.
now everything is clear to me.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users