Name
sl_destruct — Destroy a Skiplist
Synopsis
#include "skiplist.h"
| void * **sl_destruct** (
| sl, | |
| | myfree)
; | |
Description
Remove all nodes (and their clones in other Skiplists), free each datum using the myfree
function and free Skiplist memory.
- sl
-
The Skiplist.
- myfree
-
This is the optional, user-defined function that frees a data element in the skiplist. It is defined as:
typedef void (*FreeFunc) (void *);
This function returns void.
It is legal to call this function in any thread but skiplist functions are not thread safe.
See Also
“Skiplist” and sl_init
Was this page helpful?