#include <ncbi_pch.hpp>
#include "datanode.hpp"
using namespace std;


CDocNodeBase::CDocNodeBase(void):
	m_counter(0)
{}

void CDocNodeBase::x_IncRef(void)
{
	++m_counter;
}
void CDocNodeBase::x_DecRef(void)
{	
	TAtomicCounterValueType c = --m_counter;
	if (0 == c)
		delete this;
}
TAtomicCounterValueType CDocNodeBase::GetCount(void) const
{
	return m_counter.load();
}
