CountedObject< Obj > Class Template Reference
#include <CountedObject.h>
template<class Obj>
class CountedObject< Obj >
This class is derived from in order to automatically count the number of existing instances, and at shutdown write to Debug Output the leakage count for the class.
The template class Obj should be set to class deriving from this class. For example: class ParamBlock2PostLoadInfo : public IParamBlock2PostLoadInfo, private CountedObject<ParamBlock2PostLoadInfo> On shutdown, with 0 leakage, the output to Debug Output would be: Leakage count** class ParamBlock2PostLoadInfo: 0
static unsigned __int64 GetObjectCount |
( |
| ) |
|
|
inlinestatic |
Returns the current number of class instances.
36 {
return GetCounter(); }