diff -r 87eb4bdb2d0e -r 1caed6c9ba68 src/linked_list.c --- a/src/linked_list.c Sun May 21 14:40:05 2023 +0200 +++ b/src/linked_list.c Sun May 21 14:56:10 2023 +0200 @@ -876,11 +876,13 @@ cx_linked_list_node *node = ll->begin; while (node) { + cx_invoke_destructor(list, node->payload); void *next = node->next; cxFree(list->allocator, node); node = next; } - // do not free the list pointer, this is just a destructor! + + cxFree(list->allocator, list); } static cx_list_class cx_linked_list_class = {