Some functions used `new`/`delete` to allocate/free arrays. To avoid memory leaks, it would be better to avoid using raw pointers. This patch replaces the use of them with `SmallVector`.
Some functions used `new`/`delete` to allocate/free arrays. To avoid memory leaks, it would be better to avoid using raw pointers. This patch replaces the use of them with `SmallVector`.