Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy Node's handle before its Link #660

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/h5cpp/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ namespace node {

Node::Node():
attributes(*this),
handle_(),
link_()
link_(),
handle_()
{}

Node::Node(ObjectHandle &&handle,const Link &link):
attributes(*this),
handle_(std::move(handle)),
link_(link)
link_(link),
handle_(std::move(handle))
{}

Node::Node(const Node &node):
attributes(*this),
handle_(node.handle_),
link_(node.link_)
link_(node.link_),
handle_(node.handle_)
{}

Node &Node::operator=(const Node &node)
Expand Down
2 changes: 1 addition & 1 deletion src/h5cpp/node/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class DLL_EXPORT Node
attribute::AttributeManager attributes;

private:
ObjectHandle handle_; //!< access handle to the object
Link link_; //!< stores the link to the object
ObjectHandle handle_; //!< access handle to the object
};

DLL_EXPORT bool operator==(const Node &lhs, const Node &rhs);
Expand Down
Loading