Struct windows::RefCount [−][src]
#[repr(transparent)]pub struct RefCount { /* fields omitted */ }
A thread-safe reference count for use with COM implementations.
Implementations
impl RefCount
[src]
impl RefCount
[src]pub fn new() -> RefCount
[src]
Creates a new RefCount
with an initial value of 1
.
pub fn add_ref(&self) -> u32
[src]
Increments the reference count, returning the new value.
pub fn release(&self) -> u32
[src]
Decrements the reference count, returning the new value.
This operation inserts an Acquire
fence when the reference count reaches zero.
This prevents reordering before the object is destroyed.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RefCount
impl RefUnwindSafe for RefCount
impl UnwindSafe for RefCount
impl UnwindSafe for RefCount