Merge branch 'master' of git://gitorious.org/polyvox/polyvox

This commit is contained in:
Matt Williams 2011-09-21 00:20:49 +02:00
commit ee165bff78
4 changed files with 9 additions and 1 deletions

View File

@ -103,6 +103,7 @@ namespace PolyVox
LargeVolume<VoxelType>::~LargeVolume() LargeVolume<VoxelType>::~LargeVolume()
{ {
flushAll(); flushAll();
delete[] m_pUncompressedBorderData;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -49,6 +49,7 @@ namespace PolyVox
{ {
public: public:
Block(uint16_t uSideLength = 0); Block(uint16_t uSideLength = 0);
~Block();
uint16_t getSideLength(void) const; uint16_t getSideLength(void) const;
VoxelType getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const; VoxelType getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const;

View File

@ -71,7 +71,7 @@ namespace PolyVox
SimpleVolume<VoxelType>::~SimpleVolume() SimpleVolume<VoxelType>::~SimpleVolume()
{ {
delete[] m_pBlocks; delete[] m_pBlocks;
m_pBlocks = 0; delete[] m_pUncompressedBorderData;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -35,6 +35,12 @@ namespace PolyVox
} }
} }
template <typename VoxelType>
SimpleVolume<VoxelType>::Block::~Block()
{
delete[] m_tUncompressedData;
}
template <typename VoxelType> template <typename VoxelType>
uint16_t SimpleVolume<VoxelType>::Block::getSideLength(void) const uint16_t SimpleVolume<VoxelType>::Block::getSideLength(void) const
{ {