|
|
void | reset () |
| | Releases the weak reference, decrementing the weak count.
|
| |
| auto | upgrade () const noexcept -> Arc< T > |
| | Attempts to upgrade the Weak pointer to an Arc, succeeding only if strong references remain.
|
| |
| auto | strong_count () const noexcept -> usize |
| | Returns the number of strong (Arc) pointers to the same allocation.
|
| |
| auto | weak_count () const noexcept -> usize |
| | Returns the number of weak pointers to the same allocation (including this one).
|
| |
|
bool | expired () const noexcept |
| | Returns true if the value has been dropped (strong count is zero).
|
| |
|
auto | as_ptr () const noexcept |
| | Returns a raw pointer to the managed value.
|
| |
template<class T>
class alloc::sync::Weak< T >
A non-owning, weakly-referenced companion to Arc that does not prevent deallocation.
A thread-safe weak reference to an Arc-managed allocation.
- Template Parameters
-
| T | The type of the referenced value. |