19.3.4 Memory Leak in a Constructor (cont.)

DataArray::DataArray(int s)
{
   data = new int[s];
   init(s); // What happens if init throws exception?
}

DataArray::~DataArray()
{
   delete[] data;
}

void DataArray::init(int s) throw (overflow_error)
{ . . . }

prev |top |next