Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWAtomicCounter

Module:  Threads   Package:  Smart Pointer


Does not inherit

Local Index

Members

Header File

#include <rw/pointer/RWAtomicCounter.h>

Description

RWAtomicCounter is a class for maintaining a reference count. It can be safely used in a multithreaded environment. If multithread safety is not an issue, use an RWUnsafeCounter. On systems that support atomic integer operations, this class is more efficient than the equivalent RWTCounter<RWMutexLock>.

Example

Public Constructors

RWAtomicCounter(RWStaticCtor);
RWAtomicCounter(unsigned initCount = 0);
RWAtomicCounter(const RWAtomicCounter& second);

Public Member Functions

unsigned
addReference();
unsigned
references() const;
unsigned
removeReference();

Public Operators

RWAtomicCounter&
operator=(const RWAtomicCounter&);

See Also

RWUnsafeCounter, RWTCounter<RWMutexLock>



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.