123456789101112131415161718192021222324 |
- #include "ReferenceCounter.h"
- using namespace Framework;
- ReferenceCounter::ReferenceCounter()
- {
- ref = 1;
- }
- ReferenceCounter::~ReferenceCounter() {}
- ReferenceCounter *ReferenceCounter::getThis()
- {
- ref++;
- return this;
- }
- void *ReferenceCounter::release()
- {
- if( !--ref )
- delete this;
- return 0;
- }
|