Commit 4b29d8c8 authored by reichenbach's avatar reichenbach

[FIX] fixed allocation by new[] not being freed with delete[] operator (thanks @clang 3.7)

parent 203b0a57
......@@ -160,14 +160,14 @@ boost::shared_ptr< std::vector< T > > WMReadRawData::readDataTyped( std::string
T *data = new T[ numVoxels ];
ifs.read( reinterpret_cast< char* >( data ), sizeof( T ) * numVoxels );
ifs.close();
for( size_t voxelId = 0; voxelId < numVoxels; ++voxelId )
{
(*values)[voxelId] = data[voxelId];
}
ifs.close();
delete data;
delete[] data;
return values;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment