Beispiel #1
0
void valueMap::_clearTempIDs()
{
	std::list<int>::iterator it = LstTempID.begin();
	for (; it != LstTempID.end(); it++)
	{
		removeByID(*it, false);
	}
	LstTempID.clear();

// 	bool bStat = false;
// 	if (bStat)
// 	{
// 		std::map<int, int> m;
// 		for(VALUEMAPIT it = mMap.begin(); it != mMap.end(); it++)
// 		{
// 			m[it->second.mark] ++;
// 		}
// 		bStat = false;
// 	}
}
Beispiel #2
0
int valueMap::decRefCount(MAPID id)
{
	VALUEMAPIT it = mmap_find(id);
	if (mit_valid(it))
	{
		VALUEMAP_VP hv = mit_pv(it);
		hv->refCount--;
		Assert(hv->refCount >= 0);
		int ret = hv->refCount;
		if (hv->refCount <= 0)
		{
			removeByID(id, false);
		}
		return ret;
	}
	else
	{
		if (!shutingDown) 
			Assert(false, "valueMap::decRefCount fail");
		return -1;
	}
}
Beispiel #3
0
int valueMap::decRefCount(MAPID id)
{
	VALUEMAPIT it = mMap.find(id);
	if (it != mMap.end())
	{
		stHeapValue& hv = it->second;
		hv.refCount--;
		Assert(hv.refCount >= 0);
		int ret = hv.refCount;
		if (hv.refCount <= 0)
		{
			removeByID(id, false);
		}
		return ret;
	}
	else
	{
		if (!shutingDown) 
			Assert(false, "valueMap::decRefCount fail");
		return -1;
	}
}