Class: Crabstone::Binding::Instruction

Inherits:
FFI::ManagedStruct
  • Object
show all
Defined in:
lib/crabstone/binding.rb,
lib/crabstone/binding/3/instruction.rb,
lib/crabstone/binding/4/instruction.rb,
lib/crabstone/binding/5/instruction.rb

Class Method Summary collapse

Class Method Details

.release(obj) ⇒ Object



9
10
11
12
13
# File 'lib/crabstone/binding.rb', line 9

def self.release(obj)
  detail_ptr = obj.+(Instruction.offset_of(:detail)).read_pointer
  Binding.free(detail_ptr)
  Binding.free(obj)
end