From 2c2bdb8b66e386e14b5cc1a35abfbf242dcf2018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 4 Feb 2019 00:36:57 +0100 Subject: Work on propper memmory management for linked lists. --- vcal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vcal.h') diff --git a/vcal.h b/vcal.h index 91eed471..a5144992 100644 --- a/vcal.h +++ b/vcal.h @@ -28,6 +28,9 @@ typedef struct { int CONSTRUCTOR_DECL(content_line); int CONSTRUCTOR_DECL(content_line, int keylen, int vallen); +int RESOLVE(content_line) + (content_line** orig, content_line* new); + #define TYPE content_line // #include "hash.h" #include "trie.h" @@ -65,6 +68,13 @@ int free_vcalendar (vcalendar* cal); */ int push_event(vcalendar* cal, vevent* ev); +/* + * NOTE + * these create a very basic garbage collector. It shouldn't be used, + * but is useful for finding lost memmory during debugging. + * TODO + * remove it. + */ extern content_line** clines; extern int cline_ptr; -- cgit v1.2.3