PatchworkOS  10941b4
A non-POSIX operating system.
Loading...
Searching...
No Matches
weak_ptr_t Struct Reference

Weak pointer structure. More...

#include <ref.h>

Collaboration diagram for weak_ptr_t:

Data Fields

ref_tref
 
list_entry_t entry
 
void(* callback )(void *arg)
 
voidarg
 
lock_t lock
 

Detailed Description

Weak pointer structure.

Used to hold a non-owning reference to an object. If all strong references to the object are released, the weak pointer will be set to NULL and an optional callback will be invoked.

Definition at line 34 of file ref.h.

Field Documentation

◆ ref

ref_t* weak_ptr_t::ref

Definition at line 36 of file ref.h.

◆ entry

list_entry_t weak_ptr_t::entry

Definition at line 37 of file ref.h.

◆ callback

void(* weak_ptr_t::callback) (void *arg)

Definition at line 38 of file ref.h.

◆ arg

void* weak_ptr_t::arg

Definition at line 39 of file ref.h.

◆ lock

lock_t weak_ptr_t::lock

Definition at line 40 of file ref.h.


The documentation for this struct was generated from the following file: