// file: ll_cstr_0.cc
//

// isip include files
//
#include "link_list.h"
#include "link_list_constants.h"

// method: destructor
//
// arguments: none
//
// return: none
//
// this is the destructor of the class
//
Link_list::~Link_list() {

  // remove the links
  //
  Link_node* node = head_d;
  Link_node* tmp_node = (Link_node*)NULL;
  while (node != (Link_node*)NULL) {
    tmp_node = node->get_next_cc();
    manager_d->delete_cc(node);
    node = tmp_node;
  }

  // reset the current pointer
  //
  head_d = (Link_node*)NULL;
  curr_d = (Link_node*)NULL;
  
  // exit gracefully
  //
}
