Module: GirFFI::AllocationHelper
- Defined in:
- lib/gir_ffi/allocation_helper.rb
Overview
Helper module for alloction-related functionality.
Class Method Summary collapse
Class Method Details
.free_after(ptr) ⇒ Object
8 9 10 11 12 |
# File 'lib/gir_ffi/allocation_helper.rb', line 8 def self.free_after(ptr) result = yield ptr LibC.free ptr unless ptr.null? result end |