Example #1
0
//
// Method that tells the pool owned by the calling thread that
// it is free to reuse all of its memory
//
void MemoryManager::CPP_FreeAllTempMemory()
{
	DWORD dwThreadID;
	MemoryPool* pmp;

	dwThreadID = GetCurrentThreadId(); //the id of the calling thread
	pmp = GetMemoryPool(dwThreadID);

	if (!pmp) //no more room for pools
	{
		return;
	}

	pmp->FreeAllTempMemory();
}