Destroy all image resource

@return void
342757
public function destroyAll()
    {
        if ($this->newImage)
        {
            $this->destroy($this->newImage);
        }

        if ($this->sourceImage)
        {
            $this->destroy($this->sourceImage);
        }
    }
150825
function destroy():bool
    {
        if($this->isStart){
            $this->data = [];
            $this->handler->destroy($this->sid);
            return true;
        }else{
            return false;
        }
    }
920246
public function destroy()
    {
        $this->security->destroy();
        $_SESSION = [];
        setcookie(session_name(), '', 1);
        unset($_COOKIE[session_name()]);
        session_destroy();
    }
797574
function destroy()
    {
        if ( is_array( $this->ImageLayers ) )
        {
            foreach( $this->ImageLayers as $item )
            {
                if ( $this->ImageLayerIndex[$item]['image'] instanceof eZImageLayer )
                {
                    $this->ImageLayerIndex[$item]['image']->destroy();
                }
            }
        }
        parent::destroy();
    }
1368273
def destroy
      @image.destroy
  
      respond_to do |format|
        format.html { redirect_to images_url }
        format.json { head :ok }
      end
    end
701931
final public function destroy()
    {
        foreach ($this->registry as $offset => $object) {
            if (method_exists($object, '__destruct')) {
                $object->__destruct();
            }
            unset($this->registry[ $offset ]);
        }
    }
1217098
public function deleteRemoteImageCaches()
    {
        $path = Craft::$app->getPath()->getRuntimePath().'/imager/';

        try {
            FileHelper::clearDirectory(FileHelper::normalizePath($path));
        } catch (ErrorException $e) {
            Craft::error('Could not clear directory "'.$path.'" ('.$e->getMessage().')', __METHOD__);
        } catch (InvalidParamException $e) {
            Craft::error('Could not clear directory "'.$path.'" ('.$e->getMessage().')', __METHOD__);
        }
    }
384011
protected function unlinkResourceFiles()
  {
    $this->logInfo("Removing resource files");
    $count = 0;

    foreach ($this->resourceFilesInfo as $file_info)
    {
      if (isset($file_info['full_path_name_with_hash']) && isset($file_info['full_path_name']))
      {
        // Resource file has an optimized/minimized version. Remove the original file.
        if (file_exists($file_info['full_path_name']))
        {
          $this->logVerbose("Removing '%s'", $file_info['full_path_name']);
          unlink($file_info['full_path_name']);
          $count++;
        }
      }
    }

    $this->logInfo("Removed %d resource files", $count);
  }
913485
public static function DestroyAll () {
		session_destroy();
		$_SESSION = NULL;
		static::$started = FALSE;
		$response = & \MvcCore\Application::GetInstance()->GetResponse();
		if (!$response->IsSent()) {
			$params = (object) session_get_cookie_params();
			$response->DeleteCookie(
				session_name(),
				$params->path,
				$params->domain,
				$params->secure
			);
		}
	}
1193567
public function Destroy () {
		$name = $this->__name;
		$names = & static::$meta->names;
		$hoops = & static::$meta->hoops;
		$expirations = & static::$meta->expirations;
		$instances = & static::$instances;
		if (isset($names[$name])) unset($names[$name]);
		if (isset($hoops[$name])) unset($hoops[$name]);
		if (isset($expirations[$name])) unset($expirations[$name]);
		if (isset($_SESSION[$name])) unset($_SESSION[$name]);
		if (isset($instances[$name])) unset($instances[$name]);
	}
916737
public function delete()
    {     
        Util::delTree( $this->getPath() );
        foreach (Server::enum() as $s) {
            $tname = str_replace( THEME_DIR.'/', '', $s->templateDir );
            if ($tname == $this->name) {
                $s->setTheme();
            }
        }
    }
696145
protected function deleteFiles()
    {
        $this->storage->delete($this->path);

        if ($this->type == 'image') {
            $this->storage->delete($this->thumbnails->toArray());
        }
    }
392390
protected function cleanUp()
    {
        $files = glob(__DIR__.DIRECTORY_SEPARATOR.'Mapping'.DIRECTORY_SEPARATOR.'{DataType,Property,Type}'.DIRECTORY_SEPARATOR.'*.php', GLOB_BRACE);
        foreach ($files as $file) {
            unlink($file);
        }
    }
821539
protected function deleteImagesPage()
    {
        $this->controlAccess('page_edit');

        $file_ids = $this->getPosted('delete_images', array(), true, 'array');
        return $this->image->delete($file_ids);
    }
651109
protected function imageAllocate()
    {
        // Cleanup
        if (!empty($this->im)) {
            imagedestroy($this->im);
        }

        $this->im = imagecreatetruecolor($this->width*$this->scale, $this->height*$this->scale);

        // Background color
        $this->GdBgColor = imagecolorallocate(
            $this->im,
            $this->backgroundColor[0],
            $this->backgroundColor[1],
            $this->backgroundColor[2]
        );
        imagefilledrectangle($this->im, 0, 0, $this->width*$this->scale, $this->height*$this->scale, $this->GdBgColor);

        // Foreground color
        $color           = $this->colors[mt_rand(0, sizeof($this->colors)-1)];
        $this->GdFgColor = imagecolorallocate($this->im, $color[0], $color[1], $color[2]);

        // Shadow color
        if (!empty($this->shadowColor) && is_array($this->shadowColor) && sizeof($this->shadowColor) >= 3) {
            $this->GdShadowColor = imagecolorallocate(
                $this->im,
                $this->shadowColor[0],
                $this->shadowColor[1],
                $this->shadowColor[2]
            );
        }
    }
443861
protected function cleanup()
    {
        $this->filesystem->remove($this->tmpFolder);
        $this->root = null;
        $this->urlsets = array();
    }
977157
public function destroy()
    {
        $this->manialink = null;
        $this->manialinkFactory = null;
        $this->dataCollection = null;

        // There is cyclic dependency between actions and model, remove it so that memory can be freed immediately.
        $this->actionFirstPage = null;
        $this->actionGotoPage = null;
        $this->actionLastPage = null;
        $this->actionNextPage = null;
        $this->temporaryActions = [];
        $this->temporaryEntries = [];
    }