Class: HTS::LibHTS::Faidx

Inherits:
FFI::Struct show all
Defined in:
lib/hts/libhts/constants.rb

Overview

Faidx represents a faidx_t handle which is treated as a file-level RAII object in HTS::Faidx. It is intentionally kept as a plain Struct and is destroyed explicitly via LibHTS.fai_destroy in HTS::Faidx#close. Do not convert this to ManagedStruct; that would interfere with the explicit lifetime managed by the Ruby wrapper.

Class Method Summary collapse

Methods inherited from FFI::Struct

struct_layout, union_layout

Class Method Details

.release(ptr) ⇒ Object



456
457
458
# File 'lib/hts/libhts/constants.rb', line 456

def self.release(ptr)
  LibHTS.fai_destroy(ptr) unless ptr.null?
end