tmm_cache_destroy()
注意: 需要地形建模模块(Terrain Modeling Module)功能。
摘要
销毁现有缓存的内容以及缓存本身。
语法
tmm_cache_destroy (cache)
| 参数 | 类型 | 说明 |
|---|---|---|
cache |
TmmT_Cache |
要销毁的缓存 |
返回类型
void
无返回值。
头文件
tmm.h
示例
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 */);
}
详情
试图销毁一个不存在的缓存会产生错误消息。
用途
本函数销毁使用 tmm_cache_create() 创建的缓存。
错误
- 缓存参数无效。确认你的缓存尚未被传递给
tmm_cache_destroy()。
参考
- 使用函数 tmm_cache_create() 创建新缓存。
- 使用函数 tmm_cache_entry_add() 将特定位置对的路径损耗信息添加到 TmmT_cache 数据结构。
- 使用函数 tmm_cache_entry_find() 搜索 TmmT_Cache 数据结构,若存在指定位置对的路径损耗则返回。