B
Bruintje Beer
Does the code below solve memory leaks on variable m if there is an
exception thrown or do I have to cleanup the auto_ptr myself ?
void A::f()
{
try
{
auto_ptr<Object> m(new Object());
some exception thrown
}
catch(MyException& ex)
{
// some stuff
}
}
exception thrown or do I have to cleanup the auto_ptr myself ?
void A::f()
{
try
{
auto_ptr<Object> m(new Object());
some exception thrown
}
catch(MyException& ex)
{
// some stuff
}
}