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 are the types of abstraction?

0 Answers  


what is mean by design pattern

4 Answers  


What is balance factor?

0 Answers  


What is destructor oops?

0 Answers  


c++ program to swap the objects of two different classes

0 Answers  






Who invented oop?

0 Answers  


Can we have a private virtual method ?

8 Answers   Ness Technologies,


How do you use inheritance in unity?

0 Answers  


What is polymorphism explain?

0 Answers  


What is command routing in MFC

1 Answers   GE,


What is meant by oops concept?

0 Answers  


What is oop in simple words?

1 Answers  


Categories