diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-03-26 22:28:40 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-03-26 22:28:51 +0200 |
commit | 0c19e44a61229fe1376c8436b8a73e974b424539 (patch) | |
tree | d0b20502431837afd5be8929e9b7ecad6811f16a /lib/image.php | |
parent | 60a939dfcfceddbe1563e1712044a4a625bc70ac (diff) | |
download | nextcloud-server-0c19e44a61229fe1376c8436b8a73e974b424539.tar.gz nextcloud-server-0c19e44a61229fe1376c8436b8a73e974b424539.zip |
some more memory cleanup in OC_Image
Diffstat (limited to 'lib/image.php')
-rw-r--r-- | lib/image.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/image.php b/lib/image.php index 60a714880d0..62f35b4fc99 100644 --- a/lib/image.php +++ b/lib/image.php @@ -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); + } + } } |