Object

Root class of refcounted APIs.

Categoryrefcounted
Typehime_object_t

Methods

void hime_object_ref(self)

Increase reference count by one.

Parameters

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

Return

void

bool hime_object_has_one_ref(self)

Return whether the reference count is exactly one.

Parameters

Return

bool