serialization: Fix mismatched delete/delete[].