Class: FFI::AutoPointer::DefaultReleaser

Inherits:
Releaser
  • Object
show all
Defined in:
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

- (nil) release(ptr)

Release ptr by using his #release class method.



156
157
158
# File 'lib/ffi/autopointer.rb', line 156

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