diff options
Diffstat (limited to 'c++/src/H5PropList.cpp')
-rw-r--r-- | c++/src/H5PropList.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index f838fc7..8cc06bf 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -20,10 +20,8 @@ #endif #include "H5Include.h" -#include "H5RefCounter.h" #include "H5Exception.h" #include "H5IdComponent.h" -#include "H5Idtemplates.h" #include "H5PropList.h" #ifndef H5_NO_NAMESPACE @@ -89,21 +87,17 @@ void PropList::copy( const PropList& like_plist ) // reset the identifier of this PropList - send 'this' in so that // H5Pclose can be called appropriately try { - resetIdComponent( this ); } - catch (Exception close_error) { // thrown by p_close + decRefCount(); + } + catch (Exception close_error) { throw PropListIException("PropList::copy", close_error.getDetailMsg()); } // call C routine to copy the property list id = H5Pcopy( like_plist.getId() ); - // points to the same ref counter - ref_count = new RefCounter; - if( id <= 0 ) - { throw PropListIException("PropList::copy", "H5Pcopy failed"); - } } //-------------------------------------------------------------------------- @@ -571,9 +565,10 @@ PropList::~PropList() { // The property list id will be closed properly try { - resetIdComponent( this ); } - catch (Exception close_error) { // thrown by p_close - cerr << "PropList::~PropList" << close_error.getDetailMsg() << endl; + decRefCount(); + } + catch (Exception close_error) { + cerr << "PropList::~PropList - " << close_error.getDetailMsg() << endl; } } |