Skip to main content

Name

sl_destruct — Destroy a Skiplist

Synopsis

#include "skiplist.h"

| void * **sl_destruct** ( | sl, |   | |   | myfree); |   |

Skiplist * <var class="pdparam">sl</var>; FreeFunc <var class="pdparam">myfree</var>;

Description

Remove all nodes (and their clones in other Skiplists), free each datum using the myfree function and free Skiplist memory.

Parameters

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 *);

Return Value

This function returns void.

Threading

It is legal to call this function in any thread but skiplist functions are not thread safe.

See Also

Was this page helpful?