TrivialEar has data members and virtual functions, but no virtual destructor. Two subclasses (MinimalWeightEar & SelfIntersectionEar) exist, but they do not add any new data members. So deleting through any pointer should be okay, but to be sure and silence compiler warnings add the virtual dtor to the base class. This ensures all subclasses are theoretically allowed to add new data members that will get destructed, regardless of the pointer type used for destruction. |
||
---|---|---|
.. | ||
complex | ||
connectors | ||
container | ||
math | ||
simplex | ||
space |