class Inference is a polymorphic base class and needs a virtual destructor.