Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/alsa/ffi_ext.rb

Instance Method Summary collapse

Instance Method Details

#to_pointersObject



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/alsa/ffi_ext.rb', line 22

def to_pointers
  pointers = map(&:to_pointer)
  unless block_given?
    pointers
  else
    begin
      return yield pointers
    ensure
      pointers.each(&:free)
    end
  end
end