Skip to content

Commit a0eb7aa

Browse files
authored
Add Vips::Image#close.
1 parent 932c31a commit a0eb7aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/vips/image.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ class Image < Vips::Object
8383
UNKNOWN_POINTER_SIZE = FFI::Pointer.new(1).size
8484
private_constant :UNKNOWN_POINTER_SIZE
8585

86+
# Close and free all resources associated with this image.
87+
def close
88+
Vips.vips_image_invalidate_all(self)
89+
end
90+
8691
private
8792

8893
# the layout of the VipsImage struct

0 commit comments

Comments
 (0)