why destructor is not over loaded?

Answers were Sorted based on User's Feedback



why destructor is not over loaded?..

Answer / 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

why destructor is not over loaded?..

Answer / test

Destructor is not over loaded because OOP you can't Invoke a
call of the destructor (Dispose is another thing)

Is This Answer Correct ?    12 Yes 3 No

why destructor is not over loaded?..

Answer / 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

why destructor is not over loaded?..

Answer / gyana

In c# we cannot over load the desructor as because
destructor is presented by defaultly in c# and we cannot
create any object of it.we cannot also define a new
desructor.It cannot be explicitly used.for this reason we
cannot invoke the desructor and it cannot be overloaded..

Is This Answer Correct ?    3 Yes 1 No

why destructor is not over loaded?..

Answer / m.salah

destructor not overloaded because not has parameters

Is This Answer Correct ?    9 Yes 12 No

Post New Answer

More OOPS Interview Questions

What is overloading in oops?

0 Answers  


can we make a class static without using static keyword?

5 Answers   Aspire,


Why is there no multiple inheritance?

0 Answers  


how does a main() in C++ is different from main() in C?

7 Answers  


advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me

0 Answers  






WAP to generate 2n+1 lines of the following pattern on the computer screen:

2 Answers  


What are constructors in oop?

0 Answers  


What is function overloading and operator overloading?

4 Answers  


swapping program does not use third variable

5 Answers   TCS,


what is the difference between virtual function and destoctor?

1 Answers  


Can we have inheritance without polymorphism?

0 Answers  


What is a scope resolution operator?

5 Answers   HP, IBS,


Categories