From a0eb7aa247e43ab704bff9a4feb993a499502ea9 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Fri, 24 Jun 2022 19:01:06 +1200 Subject: [PATCH] Add `Vips::Image#close`. --- lib/vips/image.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/vips/image.rb b/lib/vips/image.rb index bae9c37..a985e22 100644 --- a/lib/vips/image.rb +++ b/lib/vips/image.rb @@ -83,6 +83,11 @@ class Image < Vips::Object UNKNOWN_POINTER_SIZE = FFI::Pointer.new(1).size private_constant :UNKNOWN_POINTER_SIZE + # Close and free all resources associated with this image. + def close + Vips.vips_image_invalidate_all(self) + end + private # the layout of the VipsImage struct