Added destructor to the treeBase class.