ruby: fix CacheMemory destructor

This commit is contained in:
Brad Beckmann
2009-11-18 16:33:35 -08:00
parent 7ab484624f
commit 99338a7460

View File

@@ -98,6 +98,12 @@ CacheMemory::~CacheMemory()
{
if(m_replacementPolicy_ptr != NULL)
delete m_replacementPolicy_ptr;
delete m_profiler_ptr;
for (int i = 0; i < m_cache_num_sets; i++) {
for (int j = 0; j < m_cache_assoc; j++) {
delete m_cache[i][j];
}
}
}
void CacheMemory::printConfig(ostream& out)