Class: FFI::AutoPointer::DefaultReleaser

Inherits:
Releaser show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/ffi-1.15.5/lib/ffi/autopointer.rb

Overview

DefaultReleaser is a Releaser used when an FFI::AutoPointer is defined without Proc or Method. In this case, the pointer to release must be of a class derived from AutoPointer with a #release class method.

Instance Attribute Summary

Attributes inherited from Releaser

#autorelease

Instance Method Summary collapse

Methods inherited from Releaser

#call, #free, #initialize

Constructor Details

This class inherits a constructor from FFI::AutoPointer::Releaser

Instance Method Details

#release(ptr) ⇒ nil

Release ptr using the #release class method of its class.

Parameters:

Returns:

  • (nil)


161
162
163
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/ffi-1.15.5/lib/ffi/autopointer.rb', line 161

def release(ptr)
  @proc.release(ptr)
end