Method: GObject::GObject#initialize
- Defined in:
- lib/vips/gobject.rb
#initialize(ptr) ⇒ GObject
don't allow ptr == nil, we never want to allocate a GObject struct ourselves, we just want to wrap GLib-allocated GObjects
here we use ManagedStruct, not Struct, since this is the ref that will need the unref
73 74 75 76 |
# File 'lib/vips/gobject.rb', line 73 def initialize ptr # GLib::logger.debug("GObject::GObject.initialize") {"ptr = #{ptr}"} @struct = ffi_managed_struct.new ptr end |