rlib
Convenience library for useful things
Loading...
Searching...
No Matches
RRef Struct Reference

Refcount base struct. More...

#include <rlib/rref.h>

Data Fields

rauint refcount
 
raptr weaklst
 
RDestroyNotify notify
 

Detailed Description

Refcount base struct.

Embed at offset 0 of the derived type. The refcount field is atomic so ref / unref work safely across threads.

Field Documentation

◆ notify

RDestroyNotify RRef::notify

Destructor invoked when refcount reaches zero.

◆ refcount

rauint RRef::refcount

Atomic reference count.

◆ weaklst

raptr RRef::weaklst

Atomically-published list of weak-ref callbacks.


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