Пример #1
0
//-----------------------------------------------------------------------------
// Purpose: Frees the memory contained in the mempool, and invalidates it for
//			any further use.
// Input  : *memPool - the mempool to shutdown
//-----------------------------------------------------------------------------
CMemoryPool::~CMemoryPool()
{
	if (m_BlocksAllocated > 0)
	{
		ReportLeaks();
	}
	Clear();
}
Пример #2
0
//Destructeur
CMemoryManager::~CMemoryManager(){

    // Aucune fuite
    if (m_Blocks.empty()){
        m_File << "     No leak detected !  " << std::endl;
    }
    // Fuites mémoires =(
    else{
        m_File << "WARNING: Some leaks have been detected ( " << m_Blocks.size() << " )" << std::endl;
        ReportLeaks();
    }
}
Пример #3
0
CMemLeakDetector::~CMemLeakDetector()
{
#if defined(AUTO_ENABLE_MEMLEAKDETECTOR)
	// report leaks
	Disable();
	ReportLeaks();
#endif

#if defined(PLATFORM_WINDOWS)
	for(std::size_t i = 0; i < m_ModuleInfoVector.size(); ++i)
		_free_dbg(m_ModuleInfoVector[i].m_ModuleName, _CRT_BLOCK);
#endif

	delete m_Reporter;
}
Пример #4
0
MemoryDebug::~MemoryDebug()
{
    if (!m_Blocks.empty())
        ReportLeaks();
}