aboutsummaryrefslogtreecommitdiff
path: root/array.h
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-07-14 18:41:07 +0100
committerKatharina Fey <kookie@spacekookie.de>2019-07-14 18:47:18 +0100
commitf6e83e64abbf76bbfddc90f885f7c3be379ecf2c (patch)
tree726ff7b647e7cd1704b30638d8adf73c50a15dfe /array.h
parent98852464c7d4cd3a6a08d0208378506fdce822d6 (diff)
Various improvements around HASH nodes
The example previously would lead to corrupt memory when running for items that needed to re-hash the hash array. This has been fixed. Secondly, all HASH node memory leaks are now fixed, that resulted from badly tracking objects through the resize process. A new function `hash_free_shallow` was added to help with this. The function `array_free_shallow` is unused but might become useful in the future and so was not removed. The hash strategy is still garbage but this can be fixed later :)
Diffstat (limited to 'array.h')
-rw-r--r--array.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/array.h b/array.h
index d35a1f8..a1ac8c0 100644
--- a/array.h
+++ b/array.h
@@ -21,7 +21,9 @@ err_t array_remove_key(struct bowl *, size_t, struct bowl **);
err_t array_free(struct bowl *);
+err_t array_free_shallow(struct bowl_arr *);
+
#ifdef __cplusplus
}
#endif
-#endif // _ARRAY_H_ \ No newline at end of file
+#endif // _ARRAY_H_