CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Location
    United States
    Posts
    956

    [RESOLVED] Behavior if script terminates before reaching imagedestroy

    Does anyone know what happens to a script if an image file is being manipulated (as the result of a imagecreatetruecolor call) and the script terminates before reading the call to imagedestroy that would free the memory? Does termination of the script free the memory automatically or is a memory leak created? If the latter, is there a design pattern to avoid the failure to free memory?

    Sorry for such a basic question; I read the PHP man page on the issue and was still confused.
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+) PeejAvery has a reputation beyond repute (3000+)
    Join Date
    May 2002
    Posts
    10,798

    Re: Behavior if script terminates before reaching imagedestroy

    Being that PHP is an interpreted language, resources are not kept past script execution.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Feb 2011
    Location
    United States
    Posts
    956

    Re: Behavior if script terminates before reaching imagedestroy

    Thanks!
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width