/* 删除字典 * * 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); }
void dictEmpty(dict *d) { _dictClear(d,&d->ht[0]); _dictClear(d,&d->ht[1]); d->rehashidx = -1; d->iterators = 0; }
/* Clear & Release the hash table */ void dictRelease(dict *d) { _dictClear(d,&d->ht[0]); _dictClear(d,&d->ht[1]); zfree(d); }
/* Clear & Release the hash table */ static void dictRelease(dict *ht) { _dictClear(ht); free(ht); }
/* Clear & Release the hash table */ static void dictRelease(dict *ht) { _dictClear(ht); TFREE(ht); }