Module: GirFFI::Ownable

Included in:
Struct, Union
Defined in:
lib/gir_ffi/ownable.rb

Overview

Module implementing the concept of ownership. Owned objects need to have their memory freed or ref count lowered when they’re garbage collected. Note that this attribute is generally placed on the nested struct of an object, and the relevant action is performed when the object’s finalizer is run.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ownedObject

Returns the value of attribute owned.



10
11
12
# File 'lib/gir_ffi/ownable.rb', line 10

def owned
  @owned
end

Instance Method Details

#owned?Boolean

Returns:



12
13
14
# File 'lib/gir_ffi/ownable.rb', line 12

def owned?
  owned
end