+ 4
Can destructors not be initialized?
If destructors can't be initialized, then what is the essence of ~CLASS ?
2 ответов
+ 1
Destructor gets called automatically when program ends or '}' closing bracket is encounter.
Hence, there is no need for calling Destructor.
Working :
Destructor is a special member function whose task is to destroy the object created by constructor.
0
A destructor will be executed when a object gets deleted