Bazaar developer reference

CvUnit::~CvUnit()

Defined in
CvUnit.cpp, line 398
Class
CvUnit
Not a hook point
constructor or destructor

Code

398CvUnit::~CvUnit()399{400	m_thisHandle.ignoreDestruction(true);401	FSerialization::unitsToCheck.erase(this);402	if(!gDLL->GetDone() && GC.IsGraphicsInitialized())  // don't need to remove entity when the app is shutting down, or crash can occur403	{404		auto_ptr<ICvUnit1> pDllUnit(new CvDllUnit(this));405		gDLL->GameplayUnitDestroyed(pDllUnit.get());406	}407408	if (m_iMapLayer != DEFAULT_UNIT_MAP_LAYER)409		GC.getMap().plotManager().RemoveUnit(GetIDInfo(), m_iX, m_iY, m_iMapLayer);410411	uninit();412413	OBJECT_DESTROYED414}

Calls