delete `mesh` and `result`or use `unique_ptr`