[fix] Add virtual destructor for abstract class to avoid undef behaviour