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

RWTCounter<Mutex>

Module:  Threads   Package:  Smart Pointer


Does not inherit

Local Index

Members

Header File

#include <rw/pointer/RWTCounter.h>

Description

A class for maintaining a reference count. Uses the template type as a lock for atomicity.

Generally, you will use one of two typedefs provided by the Smart Pointer package. RWSafeCounter is a typedef for RWTCounter<RWMutexLock> and provides thread-safe reference counting. RWUnsafeCounter is a typedef for RWTCounter<RWNullMutexLock> and can be used for greater efficiency when thread-safety is not required.

Public Constructors

RWTCounter(RWStaticCtor);
RWTCounter(unsigned initCount = 0);

Protected Constructor

RWTCounter(const RWTCounter<Mutex>& second);

Protected Member Operator

RWTCounter<Mutex>&
operator=(const RWTCounter<Mutex>& second);

See Also

RWSafeCounter, RWUnsafeCounter, RWTCountingPointer



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.