Example #1
0
//
// Destructor.  Because of the way memory pools get copied,
// this function needs to call an additional function to clear
// up the MemoryPool memory - the deconstructor on MemoryPool
// does not actually delete its memory
//
MemoryManager::~MemoryManager(void)
{
	MemoryPool* pmp = m_rgmp;
	int i;

	for (i = 0; i < m_impMax; i++)
	{
		if (pmp->m_rgchMemBlock)
		{
			pmp->ClearPool();
		}
		pmp++;
	}
	delete [] m_rgmp;
}