replace calloc by new/delete.