I was advised a while ago that is was common place to use std::vector as exception safe dynamic array in c++ rather than allocating raw arrays... for exampl
Could you use iterators instead of pointers?
{ std::vector scoped_array (size); std::vector::iterator pointer = scoped_array.begin(); //do work } // exception safe deallocation