Class: Plaything::OpenAL::ManagedPointer
- Inherits:
-
FFI::AutoPointer
- Object
- FFI::AutoPointer
- Plaything::OpenAL::ManagedPointer
- Defined in:
- lib/plaything/support/managed_pointer.rb
Class Method Summary collapse
Class Method Details
.release(pointer) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/plaything/support/managed_pointer.rb', line 5 def release(pointer) if pointer.null? warn "Trying to release NULL #{name}." elsif block_given? yield pointer else warn "No releaser for #{name}." end rescue => e warn "release for #{name} failed: #{e.}." end |