[MOAB-dev] r1216 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Jul 18 17:55:21 CDT 2007
Author: kraftche
Date: 2007-07-18 17:55:21 -0500 (Wed, 18 Jul 2007)
New Revision: 1216
Modified:
MOAB/trunk/ReadHDF5.cpp
Log:
Fix really stupid memory leak: I added a wrapper class around raw arrays to take care of deleting the arrays, but forgot to give the class a destructor to do the actual deletion
Modified: MOAB/trunk/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/ReadHDF5.cpp 2007-07-18 19:58:03 UTC (rev 1215)
+++ MOAB/trunk/ReadHDF5.cpp 2007-07-18 22:55:21 UTC (rev 1216)
@@ -510,6 +510,7 @@
public:
auto_array( size_t s ) : data(new T[s]) {}
auto_array() : data(0) {}
+ ~auto_array() { delete [] data; }
T* get () { return data; }
const T* get () const { return data; }
T& operator[]( size_t i ) { return data[i]; }
More information about the moab-dev
mailing list