From 8312d685baaaed21eb8e49ec60c59f2e298c922c Mon Sep 17 00:00:00 2001 From: FlyingSamson Date: Wed, 11 Dec 2024 10:48:14 +0100 Subject: [PATCH] Destroy Attributes's handle before its parent_link --- src/h5cpp/attribute/attribute.cpp | 4 ++-- src/h5cpp/attribute/attribute.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/h5cpp/attribute/attribute.cpp b/src/h5cpp/attribute/attribute.cpp index f27e83d377..6987ba984e 100644 --- a/src/h5cpp/attribute/attribute.cpp +++ b/src/h5cpp/attribute/attribute.cpp @@ -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)) { } diff --git a/src/h5cpp/attribute/attribute.hpp b/src/h5cpp/attribute/attribute.hpp index 98d21fff5c..ab47bf8bcc 100644 --- a/src/h5cpp/attribute/attribute.hpp +++ b/src/h5cpp/attribute/attribute.hpp @@ -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 void read(T &data,const datatype::Datatype &mem_type, const datatype::Datatype &file_type) const;