Exemplo n.º 1
0
        public static void hash_table_empty(Pointer <hash_table_t> h)
        {
            Pointer <hash_entry_t> e, e2;
            int i;

            for (i = 0; i < h.Deref.size; i++)
            {
                /* Free collision lists. */
                for (e = h.Deref.table[i].next; e.IsNonNull; e = e2)
                {
                    e2 = e.Deref.next;
                    ckd_alloc.ckd_free(e);
                }

                PointerHelpers.ZeroOutStruct(h.Deref.table + i, 1);
            }
            h.Deref.inuse = 0;
        }