Make destructor use deleteListContents() function.