Next: , Previous: Overview, Up: Usage


2.2 Data Encapsulation

Each node contains a data pointer which associates a separate user-supplied data structure with the node. The pointer is stored at node creation, and is passed back after searches, etc. Nodes do not contain any user data. The user is responsible for deallocating any data when individual nodes are destroyed. When deleting entire trees via rbtree_delete, a user supplied routine will be invoked on each node's data pointer, if requested.