Properly deleting data (delete vs. delete[]).

This commit is contained in:
David Williams 2013-07-24 16:53:40 +02:00
parent b07dafc9fa
commit cf9b54e5ab
2 changed files with 3 additions and 1 deletions

View File

@ -111,7 +111,7 @@ namespace PolyVox
template <typename VoxelType>
UncompressedBlock<VoxelType>::~UncompressedBlock()
{
delete m_tData;
delete[] m_tData;
m_tData = 0;
}

View File

@ -659,6 +659,8 @@ namespace PolyVox
}
}
delete itUncompressedBlock->second;
// We can now remove the block data from memory.
m_pUncompressedBlockCache.erase(itUncompressedBlock);
}