One might be suprised that there seems to be no difference between:
<?php
$imagick = new Imagick();
$imagick->clear();
$imagick->readImage('myfile.jpg');
?>
and
<?php
$imagick = new Imagick();
$imagick->destroy();
$imagick->readImage('myfile.jpg');
?>
Both functions reset all options and clear all used resources so you might want to use either one of them.
See also: http://php.net/manual/en/imagick.destroy.php
Imagick::clear
(PECL imagick 2.0.0)
Imagick::clear — Borra todos los recursos asociados con un objeto Imagick
Descripción
bool Imagick::clear
( void
)
Borra todos los recursos asociados con un objeto Imagick.
Valores devueltos
Devuelve TRUE en caso de éxito.
markus dot s dot schmitz at gmail dot com ¶
5 months ago
