use `new` and `CC_SAFE_DELETE_ARRAY` to replace `malloc` and `free`