What happens if an exception is throws from an object's
constructor and from object's destructor?

Answer Posted / achal ubbott

If an exception is generated by constructor of the class
that object is not created. That means if you do

delete obj_ptr;
the destructor would not be called.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which software is best for coding?

576


What is flush () in c++?

580


What is atoi?

546


Carry out conversion of one object of user-defined type to another?

616


When does a 'this' pointer get created?

624






How to allocate memory dynamically for a reference?

546


What is boyce codd normal form in c++?

698


What is protected inheritance?

602


What is the exit function in c++?

544


What is an arraylist c++?

690


Define token in c++.

716


Explain overriding.

608


What is functions syntax in c++?

625


What is the use of lambda in c++?

583


List the advantages of inheritance.

645