Functions | |
cu_bool_t | cu_weakptr_is_null (cu_hidden_ptr_t *link) |
void * | cu_weakptr_get (cu_hidden_ptr_t *link) |
void | cu_weakptr_init_null (cu_hidden_ptr_t *link) |
void | cu_weakptr_init (cu_hidden_ptr_t *link, void *ptr) |
void | cu_weakptr_deinit (cu_hidden_ptr_t *link) |
void | cu_weakptr_assign_null (cu_hidden_ptr_t *link) |
void | cu_weakptr_assign (cu_hidden_ptr_t *link, void *obj) |
void cu_weakptr_assign | ( | cu_hidden_ptr_t * | link, | |
void * | obj | |||
) |
Assign a non-NULL
value to link, re-registering the disappearing link.
NULL
void cu_weakptr_assign_null | ( | cu_hidden_ptr_t * | link | ) |
Assign NULL
to link, releasing any previous disappearing link registration.
void cu_weakptr_deinit | ( | cu_hidden_ptr_t * | link | ) |
Release any disappearing link registration for link.
void* cu_weakptr_get | ( | cu_hidden_ptr_t * | link | ) |
Safely return the value of the weak pointer link, or NULL
if the object it pointed to was recycled.
void cu_weakptr_init | ( | cu_hidden_ptr_t * | link, | |
void * | ptr | |||
) |
Construct link as a weak pointer to ptr. If ptr gets collected, the link will be cleared, as manifested by a NULL return from cu_weakptr_get(link)
.
NULL
void cu_weakptr_init_null | ( | cu_hidden_ptr_t * | link | ) |
Construct link as a weak pointer with a NULL value.
cu_bool_t cu_weakptr_is_null | ( | cu_hidden_ptr_t * | link | ) |
True iff link holds the NULL
pointer.