1.

Can You Explicitly Call A Destructor On A Local Variable?

Answer»

No, the DESTRUCTOR is called when the block closes in which the local variable was created.
If a destructor is called explicitly TWICE on the same object, the result ends in an undefined behavior because the local variable gets destroyed when the SCOPE ends.

No, the destructor is called when the block closes in which the local variable was created.
If a destructor is called explicitly twice on the same object, the result ends in an undefined behavior because the local variable gets destroyed when the scope ends.



Discussion

No Comment Found