Commit 1ca5e692 authored by Robert Maynard's avatar Robert Maynard Committed by David Partyka
Browse files

BUG: Fix massive memory leak when traversing time steps.

parent e95ce927
...@@ -421,6 +421,11 @@ XdmfHDF::CreateDataset( XdmfConstString path ) { ...@@ -421,6 +421,11 @@ XdmfHDF::CreateDataset( XdmfConstString path ) {
free( Pathname ); free( Pathname );
XdmfDebug("Checking for existance of " << this->Path ); XdmfDebug("Checking for existance of " << this->Path );
if ( this->Dataset != H5I_BADID ){
XdmfDebug("Closing Dataset");
H5Dclose(this->Dataset);
this->Dataset=H5I_BADID;
}
H5E_BEGIN_TRY { H5E_BEGIN_TRY {
#if (!H5_USE_16_API && ((H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)))) #if (!H5_USE_16_API && ((H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))))
this->Dataset = H5Dopen( this->Cwd, this->Path, H5P_DEFAULT ); this->Dataset = H5Dopen( this->Cwd, this->Path, H5P_DEFAULT );
......
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