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

What are the components of marker interface?

596


when to use 'mutable' keyword and when to use 'const cast' in c++

1639


Can a varargs method be overloaded?

613


What is polymorphism and types?

593


Describe these concepts: Polymorphism, Inheritance and Abstraction.

604






What is oops?what is its use in software engineering?

550


what is the drawback of classical methods in oops?

2908


Why is abstraction used?

597


What is abstraction encapsulation?

647


What is encapsulation process?

573


What is class and object with example?

581


Why is object oriented programming so hard?

608


Which method cannot be overridden?

572


Is abstract thinking intelligence?

585


What is ambiguity in inheritance?

617