why destructor is not over loaded?

Answer Posted / ramakant

Normally (in fact almost always) 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 ?    21 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

2754


explain sub-type and sub class? atleast u have differ it into 4 points?

1830


class type to basic type conversion

1833


What is a function in oop?

629


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1537






What is the difference between procedural programming and oops?

550


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

2753


What is abstraction in oops?

584


How is polymorphism achieved?

583


What is polymorphism and why is it important?

556


What is variable example?

593


What is the difference between a constructor and a destructor?

611


Why interface is used?

549


What is abstraction encapsulation?

655


What is abstraction in oop with example?

642