I have to render something with Imagick on PHP CLI. I have noticed that every 3-5 days the server memory gets full, so i can\'t even connet via ssh or ftp.
with memo
I know this is old but I ran into the same problem and calling $im->clear() instead of $im->destroy() fixed the memory leak for me.
$im->clear()
$im->destroy()
According to the documentation Imagick::destroy() has been deprecated in favor of Imagick::clear(). So clear() should be used.
Imagick::destroy() has been deprecated in favor of Imagick::clear()
clear()