ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation::scoms::kobject::kref Struct Referenceexport

Saturating atomic reference count. More...

Public Member Functions

auto is_one () const noexcept -> bool
 Check if exactly one reference remains.
auto put () noexcept -> bool
 Decrement the reference count.
auto read () const noexcept -> u32
 Read the current count (advisory — racy by definition).
auto try_get () noexcept -> bool
 Acquire a reference only while the object remains live.

Data Fields

atomic< u32 > count {1}

Detailed Description

Saturating atomic reference count.


The documentation for this struct was generated from the following file:
  • zxfoundation/scoms/kobject.zcomponent/types.cxxm