http://www.awitness.org/delphi-pascal_tutorial/source/dispose_linked_list.html The following recursive procedure will destroy a linked list (pass the head as apointer). the last element in the linked list must be set to nil. It is assumed in the example that the linked list contains a record with a field pointing to the next element in the linked list called 'nextlink'. procedure TForm1.DestroyLIFOStack(apointer:link); begin If apointer^.nextlink<>nil then DestroyLIFOStack(apointer^.nextlink); dispose(apointer); end;