reducer.h: add virtual destructor to np_base to avoid memory leaks