B
barcaroller
At which point is an object considered to be completely constructed?
X::X()
{
// constructor stuff
throw "Exception"; // premature exit
}
X* x;
try
{
x = new X; // is 'x' a complete object?
}
catch (...)
{
delete x; // is this valid?
}
Is it only the throw() that determines if an object has been constructed or
not?
X::X()
{
// constructor stuff
throw "Exception"; // premature exit
}
X* x;
try
{
x = new X; // is 'x' a complete object?
}
catch (...)
{
delete x; // is this valid?
}
Is it only the throw() that determines if an object has been constructed or
not?