M
mangesh
I read , FAQ : 17.4] How should I handle resources if my constructors
may throw exceptions?
Above faq says that use smart pointer in construcors . Because if
exception is thrown from constructor it's destructor is not run .So to
avoid memory lekage use smart pointer .
But if exception is thrown we can release resources in catch block . So
use of smart pointer is not must , we have this secnd option . Am i
right ?
may throw exceptions?
Above faq says that use smart pointer in construcors . Because if
exception is thrown from constructor it's destructor is not run .So to
avoid memory lekage use smart pointer .
But if exception is thrown we can release resources in catch block . So
use of smart pointer is not must , we have this secnd option . Am i
right ?