Back to Image class

Method destroy

public bool
destroy
()
Method to destroy an image handle and free the memory associated with the handle
Returns
  • bool True on success, false on failure or if no image is loaded
Since
  • 2.5.0
Class: Image
Project: Joomla

Method destroy - Source code

/**
 * Method to destroy an image handle and
 * free the memory associated with the handle
 *
 * @return  boolean  True on success, false on failure or if no image is loaded
 *
 * @since   2.5.0
 */
public function destroy()
{
    if ($this->isLoaded()) {
        return imagedestroy($this->getHandle());
    }
    return false;
}