|
rlib
Convenience library for useful things
|
Refcount base struct. More...
#include <rlib/rref.h>
Data Fields | |
| rauint | refcount |
| raptr | weaklst |
| RDestroyNotify | notify |
Refcount base struct.
Embed at offset 0 of the derived type. The refcount field is atomic so ref / unref work safely across threads.
| RDestroyNotify RRef::notify |
Destructor invoked when refcount reaches zero.
| rauint RRef::refcount |
Atomic reference count.
| raptr RRef::weaklst |
Atomically-published list of weak-ref callbacks.