class FFI::Struct::ManagedStructConverter

def from_native(ptr, ctx)

def from_native(ptr, ctx)
  struct_class.new(AutoPointer.new(ptr, @method))
end

def initialize(struct_class)

def initialize(struct_class)
  super(struct_class)
  raise NoMethodError, "release() not implemented for class #{struct_class}" unless struct_class.respond_to? :release
  @method = struct_class.method(:release)
end