pips_multimap_clear()

Updated: April 19, 2023

Clear the mappings in a multimap

Synopsis:

#include <pips/multimap.h>
int pips_multimap_clear(pips_multimap_t *multimap)

Arguments:

multimap
A pointer to the pips_multimap_t instance whose mappings are being cleared

Library:

pips-client

Description:

This function deletes all items in the current pips_multimap_t instance, effectively removing all of the key-value mappings. This function must be used to safely delete the contents of a multimap; otherwise, memory may be leaked.

Returns:

0
The multimap was cleared successfully
-1
An error prevented the multimap from being cleared (errno is set)

Errors:

  • EINVAL: The multimap instance is not valid.