Allocate CPU memory on demand - GPU Programming | Zoonk
Allocate CPU memory on demand
Allocate an array whose size is known only at runtime, then release it correctly with the matching cleanup operation. Compare manual allocation with the safer default of using `std::vector` when possible.