Logo Search packages:      
Sourcecode: libnl version File versions  Download package

void nl_cache_destroy ( struct nl_cache *  cache  ) 

Destroy a cache.

  • cache cache to destroy
Removes all elements of a cache and destroys the cache by freeing all internal memory allocations.

Definition at line 225 of file cache.c.

References nl_cache_delete().

Referenced by nl_cache_destroy_and_free(), and nl_cache_update().

      struct nl_object *obj, *tmp;

      NL_DBG(1, "Destroying cache %p...\n", cache);

      nl_list_for_each_entry_safe(obj, tmp, &cache->c_items, ce_list)
            nl_cache_delete(cache, obj);

Generated by  Doxygen 1.6.0   Back to index