Commit bb8d4246 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #568 from berak:hdf5_fix_delete

parents fb55f29f d2dda7f7
...@@ -367,7 +367,7 @@ vector<int> HDF5Impl::dsgetsize( String dslabel, int dims_flag ) const ...@@ -367,7 +367,7 @@ vector<int> HDF5Impl::dsgetsize( String dslabel, int dims_flag ) const
H5Dclose( dsdata ); H5Dclose( dsdata );
H5Sclose( fspace ); H5Sclose( fspace );
delete dims; delete [] dims;
return SizeVect; return SizeVect;
} }
...@@ -542,9 +542,9 @@ void HDF5Impl::dscreate( const int n_dims, const int* sizes, const int type, ...@@ -542,9 +542,9 @@ void HDF5Impl::dscreate( const int n_dims, const int* sizes, const int type,
if ( channs > 1 ) if ( channs > 1 )
H5Tclose( dstype ); H5Tclose( dstype );
delete chunks; delete [] chunks;
delete dsdims; delete [] dsdims;
delete maxdim; delete [] maxdim;
H5Pclose( dsdcpl ); H5Pclose( dsdcpl );
H5Sclose( dspace ); H5Sclose( dspace );
...@@ -659,9 +659,9 @@ void HDF5Impl::dsread( OutputArray Array, String dslabel, ...@@ -659,9 +659,9 @@ void HDF5Impl::dsread( OutputArray Array, String dslabel,
Mat matrix = Array.getMat(); Mat matrix = Array.getMat();
H5Dread( dsdata, dstype, dspace, fspace, H5P_DEFAULT, matrix.data ); H5Dread( dsdata, dstype, dspace, fspace, H5P_DEFAULT, matrix.data );
delete dsdims; delete [] dsdims;
delete mxdims; delete [] mxdims;
delete foffset; delete [] foffset;
H5Tclose( dstype ); H5Tclose( dstype );
H5Sclose( dspace ); H5Sclose( dspace );
...@@ -759,9 +759,9 @@ void HDF5Impl::dswrite( InputArray Array, String dslabel, ...@@ -759,9 +759,9 @@ void HDF5Impl::dswrite( InputArray Array, String dslabel,
if ( matrix.channels() > 1 ) if ( matrix.channels() > 1 )
H5Tclose( dstype ); H5Tclose( dstype );
delete dsizes; delete [] dsizes;
delete dsdims; delete [] dsdims;
delete offset; delete [] offset;
H5Sclose( dspace ); H5Sclose( dspace );
H5Sclose( fspace ); H5Sclose( fspace );
...@@ -894,10 +894,10 @@ void HDF5Impl::dsinsert( InputArray Array, String dslabel, ...@@ -894,10 +894,10 @@ void HDF5Impl::dsinsert( InputArray Array, String dslabel,
if ( matrix.channels() > 1 ) if ( matrix.channels() > 1 )
H5Tclose( dstype ); H5Tclose( dstype );
delete dsdims; delete [] dsdims;
delete offset; delete [] offset;
delete fsdims; delete [] fsdims;
delete nwdims; delete [] nwdims;
H5Sclose( dspace ); H5Sclose( dspace );
H5Sclose( fspace ); H5Sclose( fspace );
...@@ -1122,7 +1122,7 @@ void HDF5Impl::kpinsert( const vector<KeyPoint> keypoints, String kplabel, ...@@ -1122,7 +1122,7 @@ void HDF5Impl::kpinsert( const vector<KeyPoint> keypoints, String kplabel,
// write into dataset // write into dataset
H5Dwrite( dsdata, mmtype, dspace, fspace, H5P_DEFAULT, &keypoints[0] ); H5Dwrite( dsdata, mmtype, dspace, fspace, H5P_DEFAULT, &keypoints[0] );
delete fsdims; delete [] fsdims;
H5Tclose( mmtype ); H5Tclose( mmtype );
H5Sclose( dspace ); H5Sclose( dspace );
......
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