WP_Image_Editor_GD::__destructpublicWP 1.0

Method of the class: WP_Image_Editor_GD{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WP_Image_Editor_GD = new WP_Image_Editor_GD();
$WP_Image_Editor_GD->__destruct();

WP_Image_Editor_GD::__destruct() code WP 6.9.1

public function __destruct() {
	if ( $this->image ) {
		if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0.
			// We don't need the original in memory anymore.
			imagedestroy( $this->image );
		}
	}
}