STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
__abi_MultiThreadedRefCount Class Reference

#include <vccorlib.h>

Public Member Functions

 __declspec (non_user_code) __abi_MultiThreadedRefCount()
 
 __declspec (non_user_code) void __abi_dtor()
 
unsigned long Increment () volatile
 
unsigned long Decrement () volatile
 
unsigned long Get () volatile
 
void ReleaseControlBlock () volatile
 

Private Attributes

long __refcount
 

Member Function Documentation

__abi_MultiThreadedRefCount::__declspec ( non_user_code  )
inline
222  : __refcount(1)
223  {
224  if (__abi_module != nullptr)
225  {
226  __abi_module->__abi_IncrementObjectCount();
227  }
228  }
__abi_Module * __abi_module
long __refcount
Definition: vccorlib.h:220
__abi_MultiThreadedRefCount::__declspec ( non_user_code  )
inline
232  {
233  if (__abi_module != nullptr)
234  {
235  __abi_module->__abi_DecrementObjectCount();
236  }
237  }
__abi_Module * __abi_module
unsigned long __abi_MultiThreadedRefCount::Decrement ( ) volatile
inline
245  {
246  unsigned long __refCountLoc = static_cast<unsigned long>(_InterlockedDecrement(&__refcount));
247  if (__refCountLoc == 0)
248  {
249  // When destructing objects at the end of the program, we might be freeing
250  // objects across dlls, and the dll this object is in might have already freed its module object.
251  if (__abi_module != nullptr)
252  {
253  __abi_module->__abi_DecrementObjectCount();
254  }
255  }
256  return __refCountLoc;
257  }
__abi_Module * __abi_module
long __refcount
Definition: vccorlib.h:220
long __cdecl _InterlockedDecrement(long volatile *)
unsigned long __abi_MultiThreadedRefCount::Get ( ) volatile
inline
260  {
261  return static_cast<unsigned long>(__refcount);
262  }
long __refcount
Definition: vccorlib.h:220
unsigned long __abi_MultiThreadedRefCount::Increment ( ) volatile
inline
240  {
241  return static_cast<unsigned long>(_InterlockedIncrement(&__refcount));
242  }
long __refcount
Definition: vccorlib.h:220
long __cdecl _InterlockedIncrement(long volatile *)
void __abi_MultiThreadedRefCount::ReleaseControlBlock ( ) volatile
inline
264  {
265  }

Member Data Documentation

long __abi_MultiThreadedRefCount::__refcount
private

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