aboutsummaryrefslogtreecommitdiff
path: root/11/part2.c
diff options
context:
space:
mode:
Diffstat (limited to '11/part2.c')
-rw-r--r--11/part2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/11/part2.c b/11/part2.c
index edc67ba..b7a441d 100644
--- a/11/part2.c
+++ b/11/part2.c
@@ -1,16 +1,13 @@
#include <stdint.h>
-#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
-#include <errno.h>
#include <ctype.h>
#include <algds/str.h>
#include <algds/vec.h>
#include <algds/hash_table.h>
#include <algds/mmhash.h>
-#include <time.h>
#define PANIC do { \
fprintf(stderr, "panic at %s:%d\n", __FILE__, __LINE__); \
@@ -150,5 +147,12 @@ int main() {
}
long ret = search(Tag_new("svr"), 0, 0);
printf("%ld\n", ret);
+
+ Tag2TagVectorHashTableIter dagit = Tag2TagVectorHashTable_begin(&dag);
+ for (; dagit != NULL; dagit = Tag2TagVectorHashTable_next(&dag, dagit)) {
+ TagVector_free(&dagit->val);
+ }
+ Tag2TagVectorHashTable_free(&dag);
+ CacheEntry2LongHashTable_free(&cache);
return 0;
} \ No newline at end of file