From a600c7789ff90ec05e941e13519cf9526207191d Mon Sep 17 00:00:00 2001 From: dimitr Date: Mon, 24 Mar 2008 10:36:11 +0000 Subject: [PATCH] Validation. --- src/common/classes/RefCounted.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/classes/RefCounted.h b/src/common/classes/RefCounted.h index 3c0edb504a..03d0033921 100644 --- a/src/common/classes/RefCounted.h +++ b/src/common/classes/RefCounted.h @@ -26,6 +26,7 @@ #define COMMON_REF_COUNTED_H #include "../common/classes/fb_atomic.h" +#include "../jrd/gdsassert.h" namespace Firebird { @@ -47,7 +48,11 @@ namespace Firebird protected: RefCounted() : m_refCnt(0) {} - virtual ~RefCounted() {} + + ~RefCounted() + { + fb_assert(!m_refCnt.value()); + } private: AtomicCounter m_refCnt;