deletes the Linked List when the destructor is called