Prevent possible memory leak with Tree base class virtual destructor.