forked from metin2/client
25 lines
355 B
C++
25 lines
355 B
C++
#pragma once
|
|
|
|
class CReferenceObject
|
|
{
|
|
public:
|
|
CReferenceObject();
|
|
virtual ~CReferenceObject();
|
|
|
|
void AddReference();
|
|
void AddReferenceOnly();
|
|
void Release();
|
|
|
|
int GetReferenceCount();
|
|
|
|
bool canDestroy();
|
|
|
|
protected:
|
|
virtual void OnConstruct();
|
|
virtual void OnSelfDestruct();
|
|
|
|
private:
|
|
int m_refCount;
|
|
bool m_destructed;
|
|
};
|