@rothpc says: I tend to prefer a more C++ approach for handling memory allocations, so the MemoryUtils functions would use something like:
template<typename T> T* allocate(I n);
where it is assumed that type I is a parameter on MemoryUtils as suggested above. Error handling suggests exceptions with this approach.
Need to add basic exception handling to ReSolve in order to implement this.