summaryrefslogtreecommitdiffstats
path: root/lib/image.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-03-26 22:28:40 +0200
committerRobin Appelman <icewind@owncloud.com>2012-03-26 22:28:51 +0200
commit0c19e44a61229fe1376c8436b8a73e974b424539 (patch)
treed0b20502431837afd5be8929e9b7ecad6811f16a /lib/image.php
parent60a939dfcfceddbe1563e1712044a4a625bc70ac (diff)
downloadnextcloud-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.php8
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);
+ }
+ }
}