KUDr@9514: /* $Id$ */ KUDr@9514: KUDr@9514: #include "../stdafx.h" KUDr@9514: KUDr@9514: #include "countedptr.hpp" KUDr@9514: KUDr@9514: int32 SimpleCountedObject::AddRef() KUDr@9514: { KUDr@9514: return ++m_ref_cnt; KUDr@9514: } KUDr@9514: KUDr@9514: int32 SimpleCountedObject::Release() KUDr@9514: { KUDr@9514: int32 res = --m_ref_cnt; KUDr@9514: assert(res >= 0); KUDr@9514: if (res == 0) { KUDr@9514: FinalRelease(); KUDr@9514: delete this; KUDr@9514: } KUDr@9514: return res; KUDr@9514: }