Name
set_destroy
Synopsis
void set_destroy(Set *set
);
Return Value
None.
Description
Destroys the set specified by
set
. No other operations are permitted
after calling set_destroy unless
set_init is called again. The
set_destroy operation removes all members
from a set and calls the function passed as
destroy
to
set_init once for each member as it is
removed, provided destroy
was not set
to NULL.
Complexity
O (n), where n is the number of members in the set.
Get Mastering Algorithms with C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.