#include "Mix/Tool/Win32/Core/Reference.h"

namespace Mix{ namespace Tool{ namespace Win32{

Reference::Reference( void ) :
m_RefCount( 1 )
{
}

Reference::~Reference( void )
{
}

void Reference::AddRef( void )
{
	++m_RefCount;
}

void Reference::Release( void )
{
	int count = --m_RefCount;
	if( count <= 0 )
	{
		delete this;
	}
}

int Reference::GetRefCount( void ) const
{
	return m_RefCount;
}

}}}
