Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destroy() function not necessary anymore or just missing in v3? #1273

Closed
chescos opened this issue Jan 17, 2024 · 3 comments
Closed

destroy() function not necessary anymore or just missing in v3? #1273

chescos opened this issue Jan 17, 2024 · 3 comments

Comments

@chescos
Copy link

chescos commented Jan 17, 2024

v2 had the destroy() function which could free up memory associated with the image instance before the PHP script ended. Is this not necessary anymore for some reason, or just currently not possible with v3?

@olivervogel
Copy link
Member

Intervention Image is a wrapper providing a unified API for GD and Imagick Library. The library is therefore dependent on the functions provided by the extensions.

GD Library's imagedestroy() no longer has an effect since PHP 8, so I have decided to remove support.

I would suggest just trying to set the image variable to null or use unset() to free memory.

@cheack
Copy link

cheack commented Jan 24, 2024

@olivervogel
I think it makes sense to mention it in the upgrade manual (https://image.intervention.io/v3/introduction/upgrade).

@olivervogel
Copy link
Member

I think it makes sense to mention it in the upgrade manual (https://image.intervention.io/v3/introduction/upgrade).

You're right. I will accept pull requests: https://github.com/Intervention/docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants