I\'m currently trying to learn about classes and constructors/destructors. I understand what the two do, but I\'m having a harder time with the destructors because I can\'t
these have the most power when you have composition of dynamically allocated objects
say that I am making linkedList structure that holds pointers to linkedListNodes the list will hold the pointers to the first, and depending on singly, or doubly the last element.
in the destructor I would place the removal of all elements in the list, and therefore the list itself.
If I do not code the destructor then when the list goes out of scope, or has delete called on it the memory that was allocated for those elements is lost, and cannot be reclaimed by the system (most notably called a memory leak)