Skip to content

Commit 2a85825

Browse files
authored
Destroy Attributes's handle before its parent_link (#662)
1 parent b2669a3 commit 2a85825

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/h5cpp/attribute/attribute.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ namespace hdf5 {
3434
namespace attribute {
3535

3636
Attribute::Attribute(ObjectHandle &&handle,const node::Link &parent_link):
37-
handle_(std::move(handle)),
38-
parent_link_(parent_link)
37+
parent_link_(parent_link),
38+
handle_(std::move(handle))
3939
{
4040
}
4141

src/h5cpp/attribute/attribute.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ class DLL_EXPORT Attribute
203203
void read(T &data,const datatype::Datatype &mem_type) const;
204204

205205
private:
206-
ObjectHandle handle_;
207206
node::Link parent_link_;
207+
ObjectHandle handle_;
208208

209209
template<typename T>
210210
void read(T &data,const datatype::Datatype &mem_type, const datatype::Datatype &file_type) const;

0 commit comments

Comments
 (0)