prg_string_hash_table_free_proc()
摘要
销毁一个哈希表及其包含的值。
语法
prg_string_hash_table_free_proc (hash_table_ptr, dealloc_proc)
| 参数 | 类型 | 说明 |
|---|---|---|
hash_table_ptr |
PrgT_String_Hash_Table * |
指向要销毁的哈希表的指针。 |
dealloc_proc |
PrgT_Hash_Cell_Dealloc_Proc |
用户自定义的过程,用于销毁哈希表中的值。 |
返回类型
void
无返回值。
头文件
prg_string_hash_funcs.h
详情
该函数在释放哈希表每个单元所占用的内存之前,先对每个单元调用 dealloc_proc。dealloc_proc 的原型见 PrgT_Hash_Cell_Dealloc_Proc。
**警告:**该函数 MT 不安全(线程不安全),相关说明见“Multi-Threading Safety“ 第 11 页。对共享哈希表的访问必须由外部串行化。