Mobile API Reference  MicroStrategy 2019
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ReferenceCountedImplementation.h File Reference

Go to the source code of this file.

Macros

#define REFERENCE_COUNTED_INITIALIZATION   mnReferenceCount(0)
 
#define REFERENCE_COUNTED_IMPLEMENTATION
 

Macro Definition Documentation

◆ REFERENCE_COUNTED_IMPLEMENTATION

#define REFERENCE_COUNTED_IMPLEMENTATION
Value:
public: \
virtual void AddRef() const throw() \
{ \
++mnReferenceCount; \
} \
virtual void Release() const throw() \
{ \
/* Reference count is corrupted */ \
_ASSERTE(mnReferenceCount>0); \
if ((--mnReferenceCount) == 0) \
{ \
/* That was the last reference */ \
delete this; \
} \
} \
private: \
mutable MSynch::AtomicLong mnReferenceCount;
Definition: AtomicLong.h:71

◆ REFERENCE_COUNTED_INITIALIZATION

#define REFERENCE_COUNTED_INITIALIZATION   mnReferenceCount(0)