Class: GObject::InitiallyUnowned

Inherits:
Object
  • Object
show all
Defined in:
lib/ffi-gobject/initially_unowned.rb

Overview

Overrides for GInitiallyUnowned, GObject’s base class for objects that start with a floating reference.

Class Method Summary collapse

Class Method Details

.constructor_wrap(ptr) ⇒ Object

Wrapping method used in constructors. For InitiallyUnowned and descendants, this needs to sink the object’s floating reference.



9
10
11
# File 'lib/ffi-gobject/initially_unowned.rb', line 9

def self.constructor_wrap ptr
  super.tap { |obj| ::GObject::Lib.g_object_ref_sink obj }
end