some more memory cleanup in OC_Image

This commit is contained in:
Robin Appelman 2012-03-26 22:28:40 +02:00
parent 60a939dfcf
commit 0c19e44a61
1 changed files with 8 additions and 0 deletions

View File

@ -526,6 +526,7 @@ class OC_Image {
imagedestroy($process);
return false;
}
imagedestroy($this->resource);
$this->resource = $process;
return true;
}
@ -558,7 +559,14 @@ class OC_Image {
imagedestroy($process);
return false;
}
imagedestroy($this->resource);
$this->resource = $process;
return true;
}
public function __destruct(){
if(is_resource($this->resource)){
imagedestroy($this->resource);
}
}
}