W3cubDocs

/WordPress

WP_Image_Editor_Imagick::__destruct()

Source

public function __destruct() {
	if ( $this->image instanceof Imagick ) {
		// We don't need the original in memory anymore.
		$this->image->clear();
		$this->image->destroy();
	}
}

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor_imagick/__destruct