Fix valgrind warning about mismatched new/delete

Mostly a hygienic fix.