//
// See the file LICENSE for redistribution information.
//
// Copyright (c) 2002-2003
//	Sleepycat Software.  All rights reserved.
//

static const char revid[] = "$Id: ReferenceCounted.cpp,v 1.8 2003/05/09 00:01:51 mjc Exp $";

#include "dbxml_config.h"
#include "dbxml/XmlPortability.hpp"
#include "ReferenceCounted.hpp"

using namespace DbXml;

ReferenceCounted::ReferenceCounted()
	: count_(0)
{}

ReferenceCounted::~ReferenceCounted()
{}

void ReferenceCounted::acquire()
{
	++count_;
}

void ReferenceCounted::release()
{
	if (--count_ == 0) {
		delete this;
	}
}
