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