/* 删除字典
 *
 * Clear & Release the hash table
 *
 * Args:
 *  d 被删除的字典
 */
void dictRelease(dict *d)
{
    // 删除 0 号和 1 号哈希表
    _dictClear(d,&d->ht[0]);
    _dictClear(d,&d->ht[1]);

    // 释放字典结构
    zfree(d);
}
Beispiel #2
0
void dictEmpty(dict *d) {
    _dictClear(d,&d->ht[0]);
    _dictClear(d,&d->ht[1]);
    d->rehashidx = -1;
    d->iterators = 0;
}
Beispiel #3
0
/* Clear & Release the hash table */
void dictRelease(dict *d)
{
    _dictClear(d,&d->ht[0]);
    _dictClear(d,&d->ht[1]);
    zfree(d);
}
Beispiel #4
0
/* Clear & Release the hash table */
static void dictRelease(dict *ht) {
    _dictClear(ht);
    free(ht);
}
Beispiel #5
0
/* Clear & Release the hash table */
static void dictRelease(dict *ht) {
    _dictClear(ht);
	TFREE(ht);
}