why destructor is not over loaded?

Answer Posted / varun

Normally you never explicitly call
the destructor, it is automatically called by the C++ frame
work when the object is deleted/goes out of scope.
Therefore you would not need to overload the destructor
because the frame work always calls the default destructor.

Additionally the C++ standard defines that a conforming
compiler only allows for 1 destructor per class.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3550


What is destructor example?

592


What are the 4 pillars of oop?

666


What exactly is polymorphism?

600


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1662






What do you mean by overloading?

576


Which is not an object oriented programming language?

537


What are properties in oop?

606


what type of questions

1695


What is inheritance and how many types of inheritance?

614


What is polymorphism give a real life example?

557


What is the point of oop?

647


What is basic concept of oop?

696


Who invented oop?

648


What is purpose of inheritance?

641