ruby-vips icon indicating copy to clipboard operation
ruby-vips copied to clipboard

Add `Vips::Image#close`.

Open ioquatix opened this issue 3 years ago • 4 comments

I've been using this to help deal with memory usage issues.

ioquatix avatar Jun 24 '22 07:06 ioquatix

Hi. Just wondering. It is the thing that you've mentioned here? https://github.com/libvips/ruby-vips/issues/67#issuecomment-603048609 As I understand you said there it didn't help, only the GC.start did or something.

Nakilon avatar Jun 24 '22 10:06 Nakilon

Wow that was a while ago.

Well, I have not run the benchmarks again. That being said, in theory a close method makes sense. In practice, more work might be needed to make it practical/useful.

ioquatix avatar Jun 24 '22 11:06 ioquatix

Hi, good idea, I've been meaning to add this.

Could we call it invalidate? That's the name we've used in the other libvips bindings.

close is rather close to post_close, the name we use for cleanup-on-finalize handlers.

jcupitt avatar Jun 24 '22 14:06 jcupitt