What are zombie objects in C++?- Zombie objects are the living dead objects which are not quite alive or dead.
- This technique is inferior to throwing an exception.
- It has the unfortunate side effect of allowing objects to survive even though their constructor failed.
- An object creation of a class is failed before executing its constructor. As a constructor would not return a value, there is no confirmation that whether the constructor is executed completely or not.
- An object that is freed does not crash the applications. The application debugging is allowed by making all the states of the object intact.
|