#include "pch.h"
#include "CBaseGloabl.h"


CBaseGloabl::CBaseGloabl()
{
	m_Ref = 0;

	m_Networ = new CNetwork();
}

CBaseGloabl::~CBaseGloabl(void)
{
	if (m_Networ)
	{
		delete m_Networ;
		m_Networ = NULL;
	}
}

IBaseCurl* CBaseGloabl::GetBaseCurlInstance()
{
	return m_Networ;
}

 
INT CBaseGloabl::AddRef()
{
	return ++m_Ref;
}

INT CBaseGloabl::Release()
{
	--m_Ref;

	if (m_Ref == 0)
	{
		delete this;
		return 0;
	}

	return m_Ref;
}
