Skip to content

Conversation

@tsnorri
Copy link

@tsnorri tsnorri commented May 31, 2018

No description provided.

Copy link

@mahagr mahagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good idea. Destruct will remove the reference from the resource and free it in GC anyway.

public function __destruct()
{
if (null !== $this->resource)
imagedestroy($this->resource);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot recommend using imagedestroy() as the resource may have been used elsewhere.

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

Successfully merging this pull request may close these issues.

2 participants