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
227  : __refcount(1)
228  {
229  if (__abi_module != nullptr)
230  {
231  __abi_module->__abi_IncrementObjectCount();
232  }
233  }
__abi_Module * __abi_module
long __refcount
Definition: vccorlib.h:225
__abi_MultiThreadedRefCount::__declspec ( non_user_code  )
inline
237  {
238  if (__abi_module != nullptr)
239  {
240  __abi_module->__abi_DecrementObjectCount();
241  }
242  }
__abi_Module * __abi_module
unsigned long __abi_MultiThreadedRefCount::Decrement ( ) volatile
inline
250  {
251  unsigned long __refCountLoc = static_cast<unsigned long>(_InterlockedDecrement(&__refcount));
252  if (__refCountLoc == 0)
253  {
254  // When destructing objects at the end of the program, we might be freeing
255  // objects across dlls, and the dll this object is in might have already freed its module object.
256  if (__abi_module != nullptr)
257  {
258  __abi_module->__abi_DecrementObjectCount();
259  }
260  }
261  return __refCountLoc;
262  }
__abi_Module * __abi_module
long __refcount
Definition: vccorlib.h:225
long __cdecl _InterlockedDecrement(long volatile *)
unsigned long __abi_MultiThreadedRefCount::Get ( ) volatile
inline
265  {
266  return static_cast<unsigned long>(__refcount);
267  }
long __refcount
Definition: vccorlib.h:225
unsigned long __abi_MultiThreadedRefCount::Increment ( ) volatile
inline
245  {
246  return static_cast<unsigned long>(_InterlockedIncrement(&__refcount));
247  }
long __refcount
Definition: vccorlib.h:225
long __cdecl _InterlockedIncrement(long volatile *)
void __abi_MultiThreadedRefCount::ReleaseControlBlock ( ) volatile
inline
269  {
270  }

Member Data Documentation

long __abi_MultiThreadedRefCount::__refcount
private

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