Nette\Utils\Image missing imagedestroy()?

about a month ago

Skřetík
Member | 1
+
0
-

Hi there,

I believe there's missing Image::destroy() method (or I've just failed to find it), as it looks like when you start resizing images in loops, you're going to fill your memory fairly fast. You can obviously call imagedestroy(Image $image), but that's something which I consider a bit unclear (as I'd expect to be able to destroy it by the class itself)

Thanks
Skřetík

about a month ago

uestla
Member | 713
+
+2
-

I believe you could just use $image->destroy() since there's a magic __call() method implementation.

Unfortunatelly the @method annotation is missing for the destroy() method so the IDE won't offer you code completion (that's what you're struggling with I think).

Could you please send PR with that missing annotation added? That would be great!