+ 15
What these destructor means??[SOLVED]
What is meant by declared virtual and pure virtual destructors in c++??
7 Respuestas
+ 7
Pure virtual destructors are legal in standard C++ and one of the most important things to remember is that if a class contains a pure virtual destructor, it must provide a function body for the pure virtual destructor.
+ 3
JTB Coder what about declared virtual destructor??
+ 2
🔰 THIEA 🔰 Deleting a derived class object using a pointer of base class type that has a non-virtual destructor results in undefined behavior. To correct this situation, the base class should be defined with a virtual destructor.
+ 1
Pure destructor
This means that a derived class' destructor will be invoked first, then base class destructor will be called.
~Virtual destructor~
is used to free up the memory space allocated by the derived class object or instance while deleting instances of the derived class using a base class pointer object.
+ 1
Destructor is a function that is executed automatically when an object is destroyed that has been created by the constructor.
- 2
Can apps subscription
- 2
Cencel supscription