class FFI::ManagedStruct

def initialize(pointer=nil)

Overloads:
  • initialize
  • initialize(pointer)

Parameters:
  • pointer (Pointer) --
def initialize(pointer=nil)
  raise NoMethodError, "release() not implemented for class #{self}" unless self.class.respond_to? :release
  raise ArgumentError, "Must supply a pointer to memory for the Struct" unless pointer
  super AutoPointer.new(pointer, self.class.method(:release))
end