summaryrefslogtreecommitdiff
path: root/src/tc-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tc-list.c')
-rw-r--r--src/tc-list.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tc-list.c b/src/tc-list.c
index e0087e3..2fd6380 100644
--- a/src/tc-list.c
+++ b/src/tc-list.c
@@ -69,8 +69,14 @@ static void l_dump(bool pop)
while ((obj = (pop ?
HXclist_pop(&strings_ct, struct text_object, list) :
HXclist_shift(&strings_ct, struct text_object, list)
- )) != NULL)
+ )) != NULL) {
printf("%s item %u (\"%s\")\n", msg[pop], ++i, obj->id);
+#ifdef __cplusplus
+ delete obj;
+#else
+ free(obj);
+#endif
+ }
printf("Remaining elements: %u\n", strings_ct.items);
}