Properly deleting data (delete vs. delete[]).
This commit is contained in:
		| @@ -111,7 +111,7 @@ namespace PolyVox | ||||
| 	template <typename VoxelType> | ||||
| 	UncompressedBlock<VoxelType>::~UncompressedBlock() | ||||
| 	{ | ||||
| 		delete m_tData; | ||||
| 		delete[] m_tData; | ||||
| 		m_tData = 0; | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -659,6 +659,8 @@ namespace PolyVox | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		delete itUncompressedBlock->second; | ||||
|  | ||||
| 		// We can now remove the block data from memory. | ||||
| 		m_pUncompressedBlockCache.erase(itUncompressedBlock); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user