Is this a valid LinkedList destructor? I\'m still sort of confused by them.
I want to make sure I\'m understanding this correctly.
LinkedList::~Link
Why not do it much much simpler - with an elegant while-loop instead of trying to carefully analyze whether that overcompilcated for-loop is correct?
while
for
ListNode* current = head; while( current != 0 ) { ListNode* next = current->next; delete current; current = next; } head = 0;