8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 15:23:03 +01:00

Validation.

This commit is contained in:
dimitr 2008-03-24 10:36:11 +00:00
parent d5826adae9
commit a600c7789f

View File

@ -26,6 +26,7 @@
#define COMMON_REF_COUNTED_H #define COMMON_REF_COUNTED_H
#include "../common/classes/fb_atomic.h" #include "../common/classes/fb_atomic.h"
#include "../jrd/gdsassert.h"
namespace Firebird namespace Firebird
{ {
@ -47,7 +48,11 @@ namespace Firebird
protected: protected:
RefCounted() : m_refCnt(0) {} RefCounted() : m_refCnt(0) {}
virtual ~RefCounted() {}
~RefCounted()
{
fb_assert(!m_refCnt.value());
}
private: private:
AtomicCounter m_refCnt; AtomicCounter m_refCnt;