implement comparator destructor