#include <HxRefCountBase.h>
Public Methods | |
virtual void | addRef (int num=1) |
virtual void | removeRef () |
virtual void | destroy ()=0 |
int | refCnt () const |
Protected Methods | |
HxRefCountBase () | |
virtual | ~HxRefCountBase () |
|
00033 : _refCnt(0) 00034 { 00035 } |
|
00039 { 00040 } |
|
00044 { 00045 _refCnt += num; 00046 } |
|
00050 { 00051 std::cout << "removing ref from " << _refCnt << std::endl; 00052 if (--_refCnt <= 0) 00053 destroy(); 00054 } |
|
|
|
00058 { 00059 return _refCnt; 00060 } |