Name
queue_destroy
Synopsis
void queue_destroy(Queue *queue
);
Return Value
None.
Description
Destroys the queue specified by
queue
. No other operations are
permitted after calling queue_destroy unless
queue_init is called again. The
queue_destroy operation removes all elements
from a queue and calls the function passed as
destroy
to
queue_init once for each element as it is
removed, provided destroy
was not set
to NULL.
Complexity
O (n), where n is the number of elements in the queue.
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.