Skip to content

Commit

Permalink
Destroy Attributes's handle before its parent_link
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingSamson committed Dec 11, 2024
1 parent b2669a3 commit 8312d68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/h5cpp/attribute/attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ namespace hdf5 {
namespace attribute {

Attribute::Attribute(ObjectHandle &&handle,const node::Link &parent_link):
handle_(std::move(handle)),
parent_link_(parent_link)
parent_link_(parent_link),
handle_(std::move(handle))
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/h5cpp/attribute/attribute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ class DLL_EXPORT Attribute
void read(T &data,const datatype::Datatype &mem_type) const;

private:
ObjectHandle handle_;
node::Link parent_link_;
ObjectHandle handle_;

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

0 comments on commit 8312d68

Please sign in to comment.