Destructor synthesizing is done by a compiler of an object’s class.
For instance, if an object of a class Sample is destroyed without invoking the destructor explicitly, the compiler synthesizes the destructor which destroys the object of the class Sample.
This process is done by invoking
Sample::~Sample().