|
Embedded Template Library 1.0
|
#include <intrusive_avl_tree.h>
Public Member Functions | |
| ~link_type () | |
Friends | |
| class | intrusive_avl_tree_base |
Base for elements of this AVL tree. It's expected that a tree node type is inherited from this base.
Almost nothing is exposed from this type as public (or even protected) API - this is done deliberately and by design, so that:
|
inline |
Destructor of a tree link. Complexity: O(log(N)). Might rotate the tree as necessary to keep it balanced. NB! The tree itself is not the real owner (of memory) of its nodes (and their inherited links). The real owner (aka the user) of a node could destroy it as he/she wishes, with or without prior explicit erasure from its tree. So, if the node link happens to be still linked to a tree during its destruction, then we have to unlink it - otherwise the node's parent and its former children will keep dangling pointers to the node, which will essentially break the tree consistency and lead to UB.