12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #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;
- }
|