What is a destructor?
A destructor is a member function with the name of the class prefixed by a tilde (~) and has no return value and takes no parameters.
What does the synthesized destructor do?
The synthesized destructor disallows objects of the type from being destroyed for some classes. Otherwise, it has an empty function body and the members are automatically destoryed after the empty destructor body is run.
When is a destructor synthesized?
The compiler defines a synthesized destructor for any class that does not define its own destructor.