summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2006-05-23 18:14:24 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2006-05-23 18:14:24 (GMT)
commit51c7d9eb39f5413a690f9a1d76e27a2edf16bc67 (patch)
treead6861192b4b2f65d057e7d2c2b97f5613231309
parentdeec486732b7c8646cc0a2614a62b85fff336fe0 (diff)
downloadhdf5-51c7d9eb39f5413a690f9a1d76e27a2edf16bc67.zip
hdf5-51c7d9eb39f5413a690f9a1d76e27a2edf16bc67.tar.gz
hdf5-51c7d9eb39f5413a690f9a1d76e27a2edf16bc67.tar.bz2
[svn-r12369] Purpose: Fixed bug
Description: Shanti compiler destroy unnamed objects later than others, which caused some reference counting test fail. Revised the test so that destructors are called at the same time, regardless the differences of compiler implementation. Revised some constructors, close, operator=, and destructors to make sure that all the object ids are handled properly. Platforms tested: Linux 2.4 (heping) SunOS 5.9 (shanti) HPUX 11.00 (kelgia) AIX 5.1 (copper)
-rw-r--r--c++/test/tattr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 21fe503..e327493 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1101,18 +1101,18 @@ test_attr_dtype_shared(void)
fid1.openFile(FILENAME, H5F_ACC_RDWR);
// Open dataset
- dset = fid1.openDataSet(DSET1_NAME);
+ DataSet *dset2 = new DataSet (fid1.openDataSet(DSET1_NAME));
// Open attribute
- attr = dset.openAttribute(ATTR1_NAME);
+ Attribute *attr2 = new Attribute (dset.openAttribute(ATTR1_NAME));
// Read data from the attribute
- attr.read(PredType::NATIVE_INT, &rdata);
+ attr2->read(PredType::NATIVE_INT, &rdata);
verify_val(data, rdata, "Attribute::read", __LINE__, __FILE__);
// Close attribute and dataset
- attr.close();
- dset.close();
+ delete attr2;
+ delete dset2;
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);