STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Concurrency::details::_RefCounterBase Class Reference

#include <concrt.h>

Inheritance diagram for Concurrency::details::_RefCounterBase:
Concurrency::details::_AsyncTaskCollection

Public Member Functions

virtual ~_RefCounterBase ()
 
long _Reference ()
 
long _Release ()
 

Protected Member Functions

virtual void _Destroy ()
 
 _RefCounterBase (long _InitialCount=1)
 

Protected Attributes

volatile long _M_refCount
 

Constructor & Destructor Documentation

virtual Concurrency::details::_RefCounterBase::~_RefCounterBase ( )
inlinevirtual
4163  {
4165  }
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
volatile long _M_refCount
Definition: concrt.h:4208
Concurrency::details::_RefCounterBase::_RefCounterBase ( long  _InitialCount = 1)
inlineprotected
4202  : _M_refCount(_InitialCount)
4203  {
4205  }
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
volatile long _M_refCount
Definition: concrt.h:4208

Member Function Documentation

virtual void Concurrency::details::_RefCounterBase::_Destroy ( )
inlineprotectedvirtual

Reimplemented in Concurrency::details::_AsyncTaskCollection.

4197  {
4198  delete this;
4199  }
long Concurrency::details::_RefCounterBase::_Reference ( )
inline
4170  {
4171  long _Refcount = _InterlockedIncrement(&_M_refCount);
4172 
4173  // 0 - 1 transition is illegal
4174  _CONCRT_ASSERT(_Refcount > 1);
4175  return _Refcount;
4176  }
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
volatile long _M_refCount
Definition: concrt.h:4208
long __cdecl _InterlockedIncrement(long volatile *)
long Concurrency::details::_RefCounterBase::_Release ( )
inline
4181  {
4182  long _Refcount = _InterlockedDecrement(&_M_refCount);
4183  _CONCRT_ASSERT(_Refcount >= 0);
4184 
4185  if (_Refcount == 0)
4186  {
4187  _Destroy();
4188  }
4189 
4190  return _Refcount;
4191  }
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
long __cdecl _InterlockedDecrement(long volatile *)
volatile long _M_refCount
Definition: concrt.h:4208
virtual void _Destroy()
Definition: concrt.h:4196

Member Data Documentation

volatile long Concurrency::details::_RefCounterBase::_M_refCount
protected

The documentation for this class was generated from the following file: