From ff47a4f8bc23aff272d530ede9c79783e2fd179f Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sat, 2 Jan 2016 20:10:19 +0100 Subject: [PATCH] fixed Image::encode() leaks memory --- src/Intervention/Image/AbstractEncoder.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Intervention/Image/AbstractEncoder.php b/src/Intervention/Image/AbstractEncoder.php index afc8ecdb..5e0cce2f 100644 --- a/src/Intervention/Image/AbstractEncoder.php +++ b/src/Intervention/Image/AbstractEncoder.php @@ -152,6 +152,8 @@ abstract class AbstractEncoder ); } + $this->setImage(null); + return $image->setEncoded($this->result); }