Class: Idevice::C::ManagedOpaquePointer

Inherits:
FFI::AutoPointer
  • Object
show all
Defined in:
lib/idevice/c.rb

Instance Method Summary collapse

Constructor Details

#initialize(pointer) ⇒ ManagedOpaquePointer

Returns a new instance of ManagedOpaquePointer.

Raises:

  • (NoMethodError)

109
110
111
112
113
# File 'lib/idevice/c.rb', line 109

def initialize(pointer)
  raise NoMethodError, "release() not implemented for class #{self}" unless self.class.respond_to? :release
  raise ArgumentError, "Must supply a pointer to memory" unless pointer
  super(pointer, self.class.method(:release))
end