top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What happens when an object is destroyed that doesn't have an explicit destructor?

+2 votes
262 views
What happens when an object is destroyed that doesn't have an explicit destructor?
posted Feb 3, 2015 by Alwaz

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

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().

answer Feb 4, 2015 by Mohammed Hussain
...