class RbSDL2::Event::EventPointer

Public Class Methods

malloc() click to toggle source
# File lib/rb_sdl2/event.rb, line 5
def malloc
  ptr = new(::SDL2.SDL_calloc(1, ::SDL2::SDL_Event.size))
  raise NoMemoryError if ptr.null?
  ptr
end
release(ptr) click to toggle source
# File lib/rb_sdl2/event.rb, line 11
def release(ptr)
  # メンバーのポインターを開放する。
  Event.to_ptr(ptr).clear
  ::SDL2.SDL_free(ptr)
end