You are here

public function ImagickToolkit::__destruct in Imagick 8

Destructs a Imagick object.

File

src/Plugin/ImageToolkit/ImagickToolkit.php, line 58

Class

ImagickToolkit
Defines the Imagick toolkit for image manipulation within Drupal.

Namespace

Drupal\imagick\Plugin\ImageToolkit

Code

public function __destruct() {
  if (is_object($this
    ->getResource())) {
    $this
      ->getResource()
      ->clear();
  }
}