Characteristics
of Destructors
•
The destructor has the same name as that of the class prefixed by the tilde character
‘~’.
•
The destructor cannot have arguments
•
It has no return type
•
Destructors cannot be overloaded i.e., there can be only one destructor in a
class
•
In the absence of user defined destructor, it is generated by the compiler
•
The destructor is executed automatically when the control reaches the end of
class scope to destroy the object
•
They cannot be inherited
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.