Image::destroy
Free up memory
2.9M Downloads / Month
Open Source MIT License
2.9M Downloads / Month
Open Source MIT License
public Intervention\Image\Image destroy()
Frees memory associated with the current image instance before the PHP script ends. Normally resources are destroyed automatically after the script is finished.
Of course, the image instance is no longer usable after the method has been called.
none
none
// create an image
$img = Image::make('public/foo.jpg');
// perform some modifications
$img->resize(320, 240);
$img->save('public/small.jpg');
// destroy resource
$img->destroy();
Edit