You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HierarchyTree class is currently not copyable/movable currently. While the operations succeed, they cause issues due to memory managed using raw pointers.
For example, currently on copying a HierarchyTree, the copied-from and copied-to both have pointers to the same memory, and both attempt to delete the same memory, which is undefined behaviour.
As per the c++ standard guidelines, specifically the rule-of-three and rule-of-five, we should implement the copy+move constructors and assignment operators.
I will be happy to provide a pull request if the team is willing to consider this. This would involve recursively copying the tree for copy and cleaning transferring ownership for move.
wdyt?
The text was updated successfully, but these errors were encountered:
Very nice initiative @beingkartik.
We can assist you in this process. We inherit the raw pointers from the seminal FCL library that definitely needs to be updated.
Thanks in advance for your contribution.
The HierarchyTree class is currently not copyable/movable currently. While the operations succeed, they cause issues due to memory managed using raw pointers.
For example, currently on copying a HierarchyTree, the copied-from and copied-to both have pointers to the same memory, and both attempt to
delete
the same memory, which is undefined behaviour.As per the c++ standard guidelines, specifically the rule-of-three and rule-of-five, we should implement the copy+move constructors and assignment operators.
I will be happy to provide a pull request if the team is willing to consider this. This would involve recursively copying the tree for copy and cleaning transferring ownership for move.
wdyt?
The text was updated successfully, but these errors were encountered: