tmm_cache_destroy()
Note: Requires Terrain Modeling Module functionality
Abstract
Destroys the contents of an existing cache, as well as the cache itself.
Syntax
tmm_cache_destroy (cache)
| Argument | Type | Description |
|---|---|---|
cache |
TmmT_Cache |
the cache to destroy |
Return Value
void
No return value.
Header
tmm.h
Example
if (num_entires_added_to_cahce > 40000)
{
/* We don't want the memory used by TMM to grow beyond a fixed */
/* "high-water" mark. */
/* destroy the existing cache and start with a new empty cache */
tmm_cache_destroy (cache_ptr);
/* create a new empty cache */
cache_ptr = tmm_cache_create (TMMC_CACHE_SYMMETRIC,
100 /* 100 meters tolerance */,
5 /* 5 meters vertical tolerance */);
}
Details
Trying to destroy a cache that does not exist results in an error message.
Purpose
This function destroys a cache that was created using tmm_cache_create().
Errors
- Cache argument is invalid. Verify that your cache hasn't been passed to
tmm_cache_destroy().
Reference
- Use the function tmm_cache_create() to create a new cache.
- Use the function tmm_cache_entry_add() to add path loss information for a specific position pair to the TmmT_cache data structure.
- Use the function tmm_cache_entry_find() to search the TmmT_Cache data structure and return a path loss for the specified position pair, if one exists.