Call a destructor from the constructor?

 

Is that possible? Im talking about the same object.

Greetings.

 
You never call a destructor. If you really need it, have the destructor call a function, and the constructor can also.
 
Yes,why not?
 
hji:
Yes,why not?
Could you write down a line, with which you call the destructor, please?
 
hji: Yes,why not?
The destructor is called when an object goes out of scope.
{
   object O; // Object is alive
   ~O;       // Kill the object?
   O is still visible here. Is it alive, is it dead, - it's a zombie!
}
 
Thank you!
Reason: