You are here

public function GDToolkit::__destruct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php \Drupal\system\Plugin\ImageToolkit\GDToolkit::__destruct()

Destructs a GDToolkit object.

Frees memory associated with a GD image resource.

File

core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php, line 106

Class

GDToolkit
Defines the GD2 toolkit for image manipulation within Drupal.

Namespace

Drupal\system\Plugin\ImageToolkit

Code

public function __destruct() {
  if (is_resource($this->resource)) {
    imagedestroy($this->resource);
  }
}