diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl b/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl index dab2f35d..16927b4e 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/Block.inl @@ -111,7 +111,7 @@ namespace PolyVox template UncompressedBlock::~UncompressedBlock() { - delete m_tData; + delete[] m_tData; m_tData = 0; } diff --git a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl index 10069d49..ad67d849 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.inl @@ -659,6 +659,8 @@ namespace PolyVox } } + delete itUncompressedBlock->second; + // We can now remove the block data from memory. m_pUncompressedBlockCache.erase(itUncompressedBlock); }