In my doubly-linked list class, I am coding my destructor and this is my code:
DLinkedList::~DLinkedList() {
if (head==NULL) {
return;
}
// Other code
}
Is it safe to end a destructor with a return; statement?
I know that I can end my void functions with a return; statement, but this is a destructor.