Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Fiddle::Pointer#call_free
call_free
ext/fiddle/lib/fiddle/ffi_backend.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/ext/fiddle/lib/fiddle/ffi_backend.rb, line 377
def call_free
return if @free.nil?
return if @freed
if @free == RUBY_FREE
LibC::FREE.call(@ffi_ptr)
else
@free.call(@ffi_ptr)
end
@freed = true
end
Call the free function for this pointer. Calling more than once will do nothing. Does nothing if there is no free function attached.