mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[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)
This commit is contained in:
parent
deec486732
commit
51c7d9eb39
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user