Object
Root class of refcounted APIs.
Category | refcounted |
Type | hime_object_t |
Methods
void hime_object_ref(self)
Increase reference count by one.
Parameters
hime_object_t
self
Return
void
void hime_object_unref(self)
Decrease reference count by one, when reaching 0 the object will be destructed and its memory will be released.
Note that the reference count of refcounted objects all start from 1,
which means you must call Unref
for each object created.
Parameters
hime_object_t
self
Return
void
bool hime_object_has_one_ref(self)
Return whether the reference count is exactly one.
Parameters
hime_object_t
self
Return
bool